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
250
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
160
Review of Graph Databases
asarturas
0
100
Profiling in PHP
asarturas
5
950
Design Patterns in PHP Applications
asarturas
5
220
Application Quality
asarturas
6
340
Vagrant 1.2.2 and AWS
asarturas
0
98
Let's automate!
asarturas
0
290
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
230
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
110
Claude Team Plan導入・ガイド
tk3fftk
0
170
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
260
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
340
スマートグラスで並列バイブコーディング
hyshu
0
290
継続モナドとリアクティブプログラミング
yukikurage
3
490
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
5.7k
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
280
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
250
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
120
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Balancing Empowerment & Direction
lara
6
1.2k
Visualization
eitanlees
152
17k
Six Lessons from altMBA
skipperchong
29
4.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Crafting Experiences
bethany
1
210
A designer walks into a library…
pauljervisheath
211
24k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
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