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
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
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
2.7k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
330
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
360
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
文字コードの話
qnighy
43
16k
20260228_JAWS_Beginner_Kansai
takuyay0ne
4
360
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
190
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
8
3.2k
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
110
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
300
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
350
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
400
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
Fireside Chat
paigeccino
41
3.8k
Side Projects
sachag
455
43k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Tell your own story through comics
letsgokoyo
1
830
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
220
The Curse of the Amulet
leimatthew05
1
9.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
82
Typedesign – Prime Four
hannesfritz
42
3k
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