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 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
90
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git merge-base
How git merge-base is awesome and can help you out in difficult situations.
Harri Kirik
September 02, 2019
More Decks by Harri Kirik
See All by Harri Kirik
Secure programming techniques: Mobile Development Security guest lecture
harri35
0
92
Support for HSM-like capabilities in Android
harri35
0
170
Why doesn't my in-app QR code work (on location)?
harri35
0
55
Smoke testing your library
harri35
0
39
Collections in Kotlin
harri35
0
43
Data classes in Kotlin
harri35
0
45
How to do delegation in Kotlin
harri35
0
46
Two-factor authentication at GDG Riga
harri35
0
86
Two-factor authentication at GDG Tartu
harri35
0
67
Other Decks in How-to & DIY
See All in How-to & DIY
AWS/JAWS-UG Community Updates at JAWS-UG Kagoshima
awsjcpm
0
110
とある地方技術勉強会に集うエンジニアたちのこれまでとこれから
pharaohkj
1
230
OSSコミュニティがくれた「人との繋がり」
tanahiro2010
2
470
EmbeddingGemmaをDifyから使いたいけどAPI経由はつまらん #iotlt #gemma #dify
n0bisuke2
0
240
JAWS/AWS Community Updates - JAWS-UG新潟 #29
awsjcpm
1
180
2026年、書籍をちゃんと読むぞ👊 〜約3万円分の書籍を積読にしないためにやること〜
subroh0508
5
920
電子線香で老人を救え
izawa
0
100
Rails 8.1.1 × Claude Code
miyakawa2449
1
140
高校生の時にLINEDCに出会って、 気づけば大学を卒業します!!
inoue2002
0
130
社会人9年目の僕が贈る処世術
coco_se
1
390
ATOMS3R-CAMとClaude SKILLSでタイムラプスチャレンジ #iotlt
n0bisuke2
0
460
JAWS-UG/AWS Community Update - JAWS-UG栃木 #6
awsjcpm
0
160
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
430
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Rails Girls Zürich Keynote
gr2m
96
14k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
First, design no harm
axbom
PRO
2
1.3k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
How GitHub (no longer) Works
holman
316
150k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Optimising Largest Contentful Paint
csswizardry
37
4k
Typedesign – Prime Four
hannesfritz
42
3.2k
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