Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git Rebase
Search
Arturas Smorgun
August 29, 2013
Programming
2
230
Git Rebase
Introduction to Git Rebase by me at Inviqa Enlighening Lunch
Arturas Smorgun
August 29, 2013
Tweet
Share
More Decks by Arturas Smorgun
See All by Arturas Smorgun
Solve Complex Problems with DDD
asarturas
0
130
Review of Graph Databases
asarturas
0
75
Profiling in PHP
asarturas
5
920
Design Patterns in PHP Applications
asarturas
5
210
Application Quality
asarturas
6
320
Vagrant 1.2.2 and AWS
asarturas
0
61
Let's automate!
asarturas
0
260
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
しっかり学ぶ java.lang.*
nagise
1
370
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
210
モビリティSaaSにおけるデータ利活用の発展
nealle
0
190
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
500
flutter_kaigi_2025.pdf
kyoheig3
1
330
Tangible Code
chobishiba
3
560
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
230
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
130
Atomics APIを知る / Understanding Atomics API
ssssota
1
150
r2-image-worker
yusukebe
1
170
Feature Flags Suck! - KubeCon Atlanta 2025
phodgson
0
120
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
410
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Designing Experiences People Love
moore
142
24k
Gamification - CAS2011
davidbonilla
81
5.5k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
670
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Building an army of robots
kneath
306
46k
The Pragmatic Product Professional
lauravandoore
36
7k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Transcript
git rebase by Arturas Smorgun, Inviqa Enlightening Lunch
• Git Internal Data Structures; • Interactive Rebase; • Basic
Rebase; • Less Basic Rebase; • Use Case. Contents
Git Internals Data structures
• Content-addressable filesystem; • Insert content -- get key back;
• You can add to graph, but not edit or remove. Git
• blob -- file contents • tree -- directory layouts
and filenames • commit -- forms git commit graph • tag -- annotated tag Objects
References • Pointer to an object: • branch • remote
branch • lightweight tag
Symbolic references • Pointer to another pointer: • HEAD
Interactive Rebase
$ git rebase -i HEAD~3
Interactive • Remove or rearrange commits; • Edit commit messages;
• Amend commits; • Squash several commits; • Run shell commands.
--autosquash • Used in interactive rebase; • Commits starting with
“squash! “ will be automatically marked to squash.
Basic Rebase
$ git rebase <newbase> <newbase> - branch, to which rebasing;
git rebase • Forward-port local commits to the updated upstream
head (from manual); • One of the ways to integrate changes from one branch to another (from the internets).
How it works? • Go to common ancestor; • get
diff by each commit of current branch; • save diffs to temporary files; • reset current branch to same commit as branch you rebasing onto; • apply each change in turn.
^ say we have this
^ $ git rebase master
Less Basic Rebase
$ git rebase --onto <newbase> <base> <tip> <newbase> -- branch,
to which rebasing; <next> -- ancestor of rebase branch; <topic> -- tip of rebase branch;
^ say we have this
^ after rebase --onto
Final Note (instead of conclusion)
Do not rebase commits that you have pushed to a
public repository.
Questions?
Thank you! See Inviqa Training “Git Beyond the Basics” by
Alistair Stead and “Pro Git” ebook at http://git-scm.com/book by Scot Chacon