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
230
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
130
Review of Graph Databases
asarturas
0
75
Profiling in PHP
asarturas
5
910
Design Patterns in PHP Applications
asarturas
5
200
Application Quality
asarturas
6
320
Vagrant 1.2.2 and AWS
asarturas
0
60
Let's automate!
asarturas
0
260
AngularJS
asarturas
14
1.3k
Other Decks in Programming
See All in Programming
概念モデル→論理モデルで気をつけていること
sunnyone
3
290
速いWebフレームワークを作る
yusukebe
5
1.7k
AI時代のUIはどこへ行く?
yusukebe
18
9k
Improving my own Ruby thereafter
sisshiki1969
1
160
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
1.9k
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
590
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
560
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
1
130
旅行プランAIエージェント開発の裏側
ippo012
2
920
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
Faster Mobile Websites
deanohume
309
31k
KATA
mclloyd
32
14k
Become a Pro
speakerdeck
PRO
29
5.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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