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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Arturas Smorgun
August 29, 2013
Programming
240
2
Share
Git Rebase
Introduction to Git Rebase by me at Inviqa Enlighening Lunch
Arturas Smorgun
August 29, 2013
More Decks by Arturas Smorgun
See All by Arturas Smorgun
Solve Complex Problems with DDD
asarturas
0
150
Review of Graph Databases
asarturas
0
94
Profiling in PHP
asarturas
5
940
Design Patterns in PHP Applications
asarturas
5
220
Application Quality
asarturas
6
340
Vagrant 1.2.2 and AWS
asarturas
0
80
Let's automate!
asarturas
0
280
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.1k
第3木曜LT会 #28
tinykitten
PRO
0
110
From Formal Specification to Property Based Test
ohbarye
0
250
10 Tips of AWS ~Gen AI on AWS~
licux
5
460
実用!Hono RPC2026
yodaka
2
260
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
180
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
Making the RBS Parser Faster
soutaro
0
500
Running Swift without an OS
kishikawakatsumi
0
850
事業会社でのセキュリティ長期インターンについて
masachikaura
0
270
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
230
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
540
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
First, design no harm
axbom
PRO
2
1.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Color Theory Basics | Prateek | Gurzu
gurzu
0
290
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
160
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