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
2
240
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
140
Review of Graph Databases
asarturas
0
87
Profiling in PHP
asarturas
5
930
Design Patterns in PHP Applications
asarturas
5
210
Application Quality
asarturas
6
330
Vagrant 1.2.2 and AWS
asarturas
0
67
Let's automate!
asarturas
0
280
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
390
CSC307 Lecture 11
javiergs
PRO
0
580
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
200
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
490
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
500
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
330
浮動小数の比較について
kishikawakatsumi
0
350
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
AHC061解説
shun_pi
0
260
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
470
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
270
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Site-Speed That Sticks
csswizardry
13
1.1k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
840
Amusing Abliteration
ianozsvald
0
120
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
180
It's Worth the Effort
3n
188
29k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
120
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