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
La théorie des graphes appliquée à Git
Search
ubermuda
April 17, 2017
Technology
0
370
La théorie des graphes appliquée à Git
ubermuda
April 17, 2017
Tweet
Share
More Decks by ubermuda
See All by ubermuda
Comment Docker révolutionne le web
ubermuda
3
670
Vers des applications twelve-factor
ubermuda
2
980
Git et la théorie des graph
ubermuda
3
960
Introduction à Docker
ubermuda
6
970
Meetup Docker 101
ubermuda
1
200
A multi-container Symfony2 setup with Docker
ubermuda
40
12k
Docker Introduction
ubermuda
5
420
Symfony 2, un framework robuste et moderne
ubermuda
5
170
Migration d'une base de code subversion vers git
ubermuda
0
83
Other Decks in Technology
See All in Technology
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.8k
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
110
いざ、BSC討伐の旅
nikinusu
2
730
Team Dynamicsを目指すウイングアーク1stのQAチーム
sadonosake
1
300
地理情報データをデータベースに格納しよう~ GPUを活用した爆速データベース PG-Stromの紹介 ~
sakaik
1
130
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
500
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
130
いろんなものと両立する Kaggleの向き合い方
go5paopao
2
1.1k
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
形式手法の 10 メートル手前 #kernelvm / Kernel VM Study Hokuriku Part 7
ytaka23
5
820
強いチームと開発生産性
onk
PRO
28
8.9k
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
280
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Happy Clients
brianwarren
98
6.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
2k
The Cult of Friendly URLs
andyhume
78
6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
A Tale of Four Properties
chriscoyier
156
23k
Designing Experiences People Love
moore
138
23k
Become a Pro
speakerdeck
PRO
25
5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Transcript
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