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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
99
Profiling in PHP
asarturas
5
950
Design Patterns in PHP Applications
asarturas
5
220
Application Quality
asarturas
6
340
Vagrant 1.2.2 and AWS
asarturas
0
94
Let's automate!
asarturas
0
290
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
550
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
570
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
Oxlintのカスタムルールの現況
syumai
6
1.1k
Lessons from Spec-Driven Development
simas
PRO
0
210
Performance Engineering for Everyone
elenatanasoiu
0
180
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
710
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
A2UI という光を覗いてみる
satohjohn
1
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
150
net-httpのHTTP/2対応について
naruse
0
500
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
420
Fireside Chat
paigeccino
42
4k
Scaling GitHub
holman
464
140k
The agentic SEO stack - context over prompts
schlessera
0
820
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Typedesign – Prime Four
hannesfritz
42
3.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Discover your Explorer Soul
emna__ayadi
2
1.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
260
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