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
160
Review of Graph Databases
asarturas
0
100
Profiling in PHP
asarturas
5
960
Design Patterns in PHP Applications
asarturas
5
220
Application Quality
asarturas
6
350
Vagrant 1.2.2 and AWS
asarturas
0
99
Let's automate!
asarturas
0
290
AngularJS
asarturas
13
1.3k
Other Decks in Programming
See All in Programming
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
410
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
180
Dockerfile CMD for Node.js
grazie1999
0
160
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
190
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
400
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
480
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
130
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
120
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
0
110
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.4k
不幸な GC
chencmd
0
840
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
240
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
230
Abbi's Birthday
coloredviolet
3
9.6k
Facilitating Awesome Meetings
lara
57
7.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Building Adaptive Systems
keathley
44
3.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Building AI with AI
inesmontani
PRO
1
1.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
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