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 merge-base
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Harri Kirik
September 02, 2019
How-to & DIY
1
73
Git merge-base
How git merge-base is awesome and can help you out in difficult situations.
Harri Kirik
September 02, 2019
Tweet
Share
More Decks by Harri Kirik
See All by Harri Kirik
Secure programming techniques: Mobile Development Security guest lecture
harri35
0
83
Support for HSM-like capabilities in Android
harri35
0
140
Why doesn't my in-app QR code work (on location)?
harri35
0
33
Smoke testing your library
harri35
0
28
Collections in Kotlin
harri35
0
36
Data classes in Kotlin
harri35
0
34
How to do delegation in Kotlin
harri35
0
37
Two-factor authentication at GDG Riga
harri35
0
74
Two-factor authentication at GDG Tartu
harri35
0
57
Other Decks in How-to & DIY
See All in How-to & DIY
JAWS-UG/AWS Communities Updates 2025/11/8 JAWS-UG 島根支部
awsjcpm
1
110
自分がご機嫌になれる 素敵な場所を守るために
kenichirokimura
3
660
ブロックテーマをゴリゴリに使い倒してサイトを作った話 / Kansai WordPress Meetup 2025 01 25
tbshiki
1
1.4k
AIをフル活用! 猫版MBTI「CATS診断」 爆速開発の裏側【個人開発のAIツール活用 LT Night 登壇用スライド】
omori0219
0
1.4k
JAWS-UGのご紹介 JAWS-UGとは?
awsjcpm
0
5.5k
The Definitive? Guide To Locally Organizing RubyKaigi
sylph01
9
2.5k
SoracomUG-Ishikawa-1.pdf
yukima77
0
140
10分de名コミュ “最高の自分”を演じ憧れの同業者と渡り合う
subroh0508
1
610
ボードゲーム × 専用収納 〜3Dプリントで埋めるニッチな隙間〜 / Board Games × Custom Storage
handlename
0
160
20250226_AI Code Agents祭り_MK_AIコーディングエージェントのコラボレーション開発
mk0721
PRO
0
130
【ふりかえりワークショップ】Tryを決めるだけじゃない!感情にフォーカスした、ふりかえりを体験しよう!
scrummasudar
0
1k
わたしと仕事とアジャイルコミュニティ / developers summit 2025
matsuoshi
0
1.7k
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
190
Being A Developer After 40
akosma
91
590k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
エンジニアに許された特別な時間の終わり
watany
106
230k
How to Ace a Technical Interview
jacobian
281
24k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Discover your Explorer Soul
emna__ayadi
2
1.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Exploring anti-patterns in Rails
aemeredith
2
250
[SF Ruby Conf 2025] Rails X
palkan
0
740
Transcript
DEMODAY git merge-base dive deeper Location, DD/MM/YYYY Name Surname, job
title Title of the talk Git merge-base September 2nd, 2019 YOU SHOULD UNDERSTAND AND USE
DEMODAY git merge-base git merge-base finds the best common ancestor
between two commits to use in a three-way merge. 02
DEMODAY git merge-base Ancestor is a parent or a parent
of a parent (grandparent) or a great-grandparent, or a great-great-grandparent and so forth 03
DEMODAY git merge-base One common ancestor X is better than
another common ancestor Y if Y is an ancestor of X. 04
DEMODAY git merge-base A common ancestor that does not have
any better common ancestor is a best common ancestor, i.e. a merge base. 05
DEMODAY git merge base Example HERE YOU GO, HAVE AN
06
DEMODAY git merge-base “git merge-base A B” is 1: 07
o---o---o---B / ---2---1---o---o---o---A
DEMODAY git merge-base More than two commits as an argument?
A B C ? 08
DEMODAY git merge-base Then the first commit (A) is the
first argument, other commits (B C) will be merged* to create a second argument. 09
DEMODAY git merge-base “git merge-base A B C” is 1:
010 o----o----o----o----C / o----o----o----B / / ---2----1----o----o----o----A
DEMODAY git merge-base 02 Is awesome! GIT MERGE-BASE
DEMODAY git merge-base 02 Is useful! GIT MERGE-BASE
DEMODAY git merge-base For developing a fix to a release
and dev branches at the same time. 013
DEMODAY git merge base Something has gone wrong with the
release We need to fix it fast! IMAGINE THAT 014
DEMODAY git merge-base 1. ASAP: Fix the release 2. Merge
the fix to dev so development can continue 015
DEMODAY git merge-base 016 o---release-x / ---o---o---o---o---o---dev
DEMODAY git merge-base 1. Create a fix branch at a
merge base > git checkout -b fix-x $(git merge-base develop release-x) 017
DEMODAY git merge-base 018 o---release-x / ---o---o---o---o---o---dev | fix-x
DEMODAY git merge-base 2. Fix the in fix-x branch 3.
At release-x merge in the fix > git merge fix-x 4. Create and release another binary 5. At dev merge in the fix > git merge fix-x 019
DEMODAY git merge-base One fix! 020
DEMODAY git merge-base Merged into two diverged branches! 021
DEMODAY git merge-base Did not get any merge conflicts! 022
DEMODAY git merge-base Everything would still be fine even if
these branches would be merged between themselves. 023
DEMODAY git merge-base Because this is the same commit on
both branches. 024
DEMODAY git merge-base PS: Avoid cherry-picking like the plague! It
makes magic happen. When you least expect it .. 025
DEMODAY git merge-base 02 Is awesome! GIT MERGE-BASE
DEMODAY git merge base Something? OK, COOL.. DID I FORGET
027
DEMODAY git merge-base 028 git merge-base finds best common ancestor(s)
between two commits to use in a three-way merge.
DEMODAY git merge base Bonus content SOME 029
DEMODAY git merge-base 030 How does Git know to merge
changes?
DEMODAY git merge-base 031 .. amount = 15; .. ..
amount = 3; .. File A File B
DEMODAY git merge-base 032 .. amount = 15; .. ..
amount = 3; .. File A File B .. amount = 3; .. Common ancestor
DEMODAY git merge-base Questions, comments, Git stories .. THANKS! September
2nd, 2019