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
90
Profiling in PHP
asarturas
5
940
Design Patterns in PHP Applications
asarturas
5
210
Application Quality
asarturas
6
330
Vagrant 1.2.2 and AWS
asarturas
0
68
Let's automate!
asarturas
0
280
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
140
CSC307 Lecture 14
javiergs
PRO
0
480
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
160
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
480
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
280
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
180
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
760
PHPで TLSのプロトコルを実装してみる
higaki_program
0
240
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
550
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
Building AI with AI
inesmontani
PRO
1
800
A Modern Web Designer's Workflow
chriscoyier
698
190k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
150
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Fireside Chat
paigeccino
42
3.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
320
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
4 Signs Your Business is Dying
shpigford
187
22k
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