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
220
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
70
Profiling in PHP
asarturas
5
910
Design Patterns in PHP Applications
asarturas
5
200
Application Quality
asarturas
6
310
Vagrant 1.2.2 and AWS
asarturas
0
54
Let's automate!
asarturas
0
250
AngularJS
asarturas
14
1.3k
Other Decks in Programming
See All in Programming
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
420
Global Azure 2025 @ Kansai / Hyperlight
kosmosebi
0
160
リアーキテクチャの現場で向き合う 既存サービスの読み解きと設計判断
ymiyamu
0
140
Vibe Coding の話をしよう
schroneko
14
3.9k
クラス設計の手順
akikogoto
0
120
OpenTelemetry + LLM = OpenLLMetry!?
yunosukey
2
170
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
270
Cursorを活用したAIプログラミングについて 入門
rect
0
250
Flutterでllama.cppをつかってローカルLLMを試してみた
sakuraidayo
0
150
ComposeでのPicture in Picture
takathemax
0
140
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
140
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
270
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Documentation Writing (for coders)
carmenintech
71
4.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
33k
Visualization
eitanlees
146
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Into the Great Unknown - MozCon
thekraken
38
1.8k
BBQ
matthewcrist
88
9.6k
Automating Front-end Workflow
addyosmani
1370
200k
Side Projects
sachag
453
42k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Six Lessons from altMBA
skipperchong
28
3.8k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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