Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Git Rebase
Search
Arturas Smorgun
August 29, 2013
Programming
260
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
Transcript
25 slides
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
More Decks by Arturas Smorgun
See All by Arturas Smorgun
Solve Complex Problems with DDD
asarturas
0
170
Review of Graph Databases
asarturas
0
110
Profiling in PHP
asarturas
5
970
Design Patterns in PHP Applications
asarturas
5
230
Application Quality
asarturas
6
360
Vagrant 1.2.2 and AWS
asarturas
0
110
Let's automate!
asarturas
0
300
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
430
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
660
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
300
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
350
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
310
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
160
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
400
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
440
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
250
SODA - FACT BOOK(EN)
sodainc
1
260
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
The Curse of the Amulet
leimatthew05
4
17k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
Side Projects
sachag
456
43k
Between Models and Reality
mayunak
4
590
A designer walks into a library…
pauljervisheath
211
25k
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Raft: Consensus for Rubyists
vanstee
143
7.9k