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
220
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
120
Review of Graph Databases
asarturas
0
74
Profiling in PHP
asarturas
5
910
Design Patterns in PHP Applications
asarturas
5
200
Application Quality
asarturas
6
310
Vagrant 1.2.2 and AWS
asarturas
0
59
Let's automate!
asarturas
0
260
AngularJS
asarturas
14
1.3k
Other Decks in Programming
See All in Programming
LLMは麻雀を知らなすぎるから俺が教育してやる
po3rin
3
2k
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
690
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
0
230
実践 Dev Containers × Claude Code
touyu
1
160
階層化自動テストで開発に機動力を
ickx
1
480
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
110
技術的負債で信頼性が限界だったWordPress運用をShifterで完全復活させた話
rvirus0817
0
760
MCPで実現できる、Webサービス利用体験について
syumai
7
2.4k
Infer入門
riru
4
1.3k
物語を動かす行動"量" #エンジニアニメ
konifar
13
3.6k
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
470
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
21
10k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.7k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Music & Morning Musume
bryan
46
6.7k
Designing for humans not robots
tammielis
253
25k
Why Our Code Smells
bkeepers
PRO
337
57k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
880
Testing 201, or: Great Expectations
jmmastey
45
7.6k
For a Future-Friendly Web
brad_frost
179
9.9k
KATA
mclloyd
32
14k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
Measuring & Analyzing Core Web Vitals
bluesmoon
8
550
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.4k
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