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
240
2
Share
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
150
Review of Graph Databases
asarturas
0
94
Profiling in PHP
asarturas
5
940
Design Patterns in PHP Applications
asarturas
5
220
Application Quality
asarturas
6
340
Vagrant 1.2.2 and AWS
asarturas
0
85
Let's automate!
asarturas
0
280
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
20260514_its_the_context_window_stupid.pdf
heita
0
1k
Back to the roots of date
jinroq
0
870
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
150
Are We Really Coding 10× Faster with AI?
kohzas
0
190
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
1
120
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
0
190
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
0
190
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.8k
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
0
240
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Optimizing for Happiness
mojombo
378
71k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
YesSQL, Process and Tooling at Scale
rocio
174
15k
So, you think you're a good person
axbom
PRO
2
2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Typedesign – Prime Four
hannesfritz
42
3k
Believing is Seeing
oripsolob
1
130
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Designing for Timeless Needs
cassininazir
1
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