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
210
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
65
Profiling in PHP
asarturas
5
890
Design Patterns in PHP Applications
asarturas
5
190
Application Quality
asarturas
6
310
Vagrant 1.2.2 and AWS
asarturas
0
50
Let's automate!
asarturas
0
240
AngularJS
asarturas
14
1.3k
Other Decks in Programming
See All in Programming
Amazon Nova Reelの可能性
hideg
0
200
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
170
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
170
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
430
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Designing for humans not robots
tammielis
250
25k
A Tale of Four Properties
chriscoyier
157
23k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Statistics for Hackers
jakevdp
797
220k
4 Signs Your Business is Dying
shpigford
182
22k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
GraphQLとの向き合い方2022年版
quramy
44
13k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.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