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
250
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
96
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
89
Let's automate!
asarturas
0
290
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
今さら聞けないCancellationToken
htkym
0
210
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
680
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
110
JavaDoc 再入門
nagise
0
220
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
18
7.6k
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
990
Moments When Things Go Wrong
aurimas
3
130
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
210
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Statistics for Hackers
jakevdp
799
230k
Building AI with AI
inesmontani
PRO
1
1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
How to build a perfect <img>
jonoalderson
1
5.5k
Leo the Paperboy
mayatellez
7
1.8k
Docker and Python
trallard
47
3.9k
Marketing to machines
jonoalderson
1
5.3k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
130
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
280
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