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
La théorie des graphes appliquée à Git
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ubermuda
April 17, 2017
Technology
440
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
La théorie des graphes appliquée à Git
ubermuda
April 17, 2017
Transcript
66 slides
La théorie des graphes appliquée à git Geoffrey Bachelet @ubermuda
Königsberg
ez pz Leonhard Euler
None
Pont Masse de terre
Arête Noeud graphe
1 2 3 4
None
A B E D C
A B E D C Noeuds
A B E C Arêtes D
A B E D C Graph orienté
A B E D C Graph orienté
None
Atteignabilité
Atteignabilité C est atteignable depuis E A B E D
C
Atteignabilité NOPE A B E D C
A B D E C F D n'est pas atteignable
depuis F Atteignabilité
Atteignabilité
None
$ git branch * master $ ls .git/refs/heads/ master $
cat .git/refs/heads/master 58bd01cded7904f1596cb12aac1d3e0e8ae6b558
$ git log --format="%H" 6465a2cd4d6d3b0a0a62588eeb5b798bb7d31a71 7d1d4dabc49854a0807200361731446476565094 17a59ceda9b2806e2a135df039506d1ec1a976e6 ...
$ echo "6465a2cd" > .git/refs/heads/foo
$ git branch * master foo
A B D E C F master foo
A B D E C F master foo Atteignabilité !
None
Rappel • Une branche • Un tag • HEAD :
commit actuel à un instant T Références
Merge
A B D E C F master foo HEAD $
git merge master
A B D E C F master foo $ git
merge master HEAD
A B D E C F master G foo $
git merge master HEAD
A B D E C F master foo G foo
$ git merge master HEAD
A B D E C F master foo G Atteignabilité
! HEAD
fast-forward
A B C E D foo master F HEAD $
git merge foo
A B C E D foo master F $ git
merge foo Atteignable HEAD
C E D foo master F master A B $
git merge foo HEAD
cherry-pick
A B D E C F master foo $ git
cherry-pick F HEAD
master foo F' A B D E C F foo
$ git cherry-pick F HEAD
rebase
$ git rebase master A B D E C F
master foo HEAD
B merge base A D E C F master foo
$ git rebase master HEAD
merge base premier ancêtre commun Atteignable !
A B D E C F master foo Atteignable !
HEAD
A B D E C F master foo C' $
git rebase master HEAD
A B D E C F master foo C' D'
$ git rebase master HEAD
A B D E C F master foo C' D'
foo $ git rebase master HEAD
A B D E C F master C' D' foo
$ git rebase master HEAD
A B D E C F master C' D' foo
Headless $ git rebase master HEAD
Headless non-atteignable depuis une référence susceptible d'être "garbage collecté"
A B D E C F master C' D' foo
$ git reset --hard D foo A B D E C F C' D' HEAD
$ git reflog ... 384b39c HEAD@{10}: merge feature/bdl-auth: Fast-forward 84541fe
HEAD@{11}: checkout: moving from feature/bdl-auth to 384b39c HEAD@{12}: rebase finished: returning to refs/heads/f 384b39c HEAD@{13}: rebase: Add auth bundle
fetch
A B C D master A B master origin local
origin/master
local A B C D master A B master origin
origin/master FETCH !
A B C D master A B master C D
origin/master origin origin/master local
push
A B master A B master origin local C D
A B master A B master origin push D D
local C
A B master A B master A B A B
origin local C D D PAS ATTEIGNABLE
A B master A B master A B A B
origin local C D D NOPE
None
Atteignabilité.
https://speackerdeck.com/ubermuda https://think-like-a-git.net/ Geoffrey Bachelet @ubermuda
More Decks by ubermuda
See All by ubermuda
Comment Docker révolutionne le web
ubermuda
3
740
Vers des applications twelve-factor
ubermuda
2
1.1k
Git et la théorie des graph
ubermuda
3
1.1k
Introduction à Docker
ubermuda
6
1.1k
Meetup Docker 101
ubermuda
1
250
A multi-container Symfony2 setup with Docker
ubermuda
40
12k
Docker Introduction
ubermuda
5
570
Symfony 2, un framework robuste et moderne
ubermuda
5
230
Migration d'une base de code subversion vers git
ubermuda
0
150
Other Decks in Technology
See All in Technology
Kiro のリモートワークスペース: IDE は手元のままで、ワークスペースをクラウド、コンテナ、自前のマシンに置く
inariku
PRO
1
180
フロントエンドのテストカバレッジは 100%強制がいい
bengo4com
5
1.8k
NutanixへのSSHアクセスの今後について
shadowhat
0
170
攻撃と守りは何が変わり、何が変わらないのか~最近の不正アクセスから考える、リスク評価と標準の使いどころ
oidfj
2
320
Kubernetes, Agones, WebRTC, GPU で作る クラウドゲーミング基盤を本番運用に乗せるまで
vivion
0
280
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
520
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.3k
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
130
クラウドでも使えるNetApp -現場目線での設計とクラウドバックアップの活用
ryutakondo
1
330
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
200
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
2
630
Welcome JXL!
dynamis
0
120
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
Become a Pro
speakerdeck
PRO
31
6.4k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
620
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
580