Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
76
Profiling in PHP
asarturas
5
920
Design Patterns in PHP Applications
asarturas
5
210
Application Quality
asarturas
6
320
Vagrant 1.2.2 and AWS
asarturas
0
61
Let's automate!
asarturas
0
260
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
470
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
180
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
1
1.4k
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
110
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
130
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
490
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
11
3.9k
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
Microservices rules: What good looks like
cer
PRO
0
540
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
140
AIコーディングエージェント(NotebookLM)
kondai24
0
120
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Become a Pro
speakerdeck
PRO
30
5.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Speed Design
sergeychernyshev
33
1.4k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
How to train your dragon (web standard)
notwaldorf
97
6.4k
What's in a price? How to price your products and services
michaelherold
246
12k
Building Adaptive Systems
keathley
44
2.9k
Music & Morning Musume
bryan
46
7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
A better future with KSS
kneath
240
18k
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