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
81
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
63
Let's automate!
asarturas
0
270
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
180
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
6
1.8k
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
230
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
300
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
Implementation Patterns
denyspoltorak
0
140
CSC307 Lecture 02
javiergs
PRO
1
740
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
240
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
150
GoLab2025 Recap
kuro_kurorrr
0
1.5k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
54
Mobile First: as difficult as doing things right
swwweet
225
10k
Bash Introduction
62gerente
615
210k
It's Worth the Effort
3n
187
29k
Ethics towards AI in product and experience design
skipperchong
1
160
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
51k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
48k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
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