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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
440
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
AHC061解説
shun_pi
0
400
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
OTP を自動で入力する裏技
megabitsenmzq
0
120
ロボットのための工場に灯りは要らない
watany
11
3k
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
200
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
130
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
110
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
We Have a Design System, Now What?
morganepeng
55
8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Automating Front-end Workflow
addyosmani
1370
200k
Designing Powerful Visuals for Engaging Learning
tmiket
0
290
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
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