forked from MarkLodato/visual-git-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge.tex
42 lines (36 loc) · 1.24 KB
/
merge.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\input{common.tex}
\begin{document}
\begin{tikzpicture}[main]
\boundingbox
\normalcommits
\indexnode[2,-3]
\worknode[-2,-3]
\commit 2eecb (2) -> B;
\commit 33104 (3) -> 2;
\branch other -> 3;
% draw the old branch manually with a long line
\node [old branch, above=1 of E] (old master) {master};
\path [old branch line] (old master) edge (E);
\node [cancel ref, above=.2\g of E, anchor=center] {};
\oldHEAD -> old master;
\newcommit f8bc5 (F) -> E;
\branch master -> F;
\HEAD -> master;
\path [background line, bend right=15] (F) edge[-] (3);
\path [commit line, bend right=15] (F) edge (3);
\node [cmd] at (0, 3.75) {git merge other};
\node [inner sep=8\gLine] (merge) at (0,-1) {3-way merge};
\path [background line]
(3) edge [-, bend right=15] (merge)
;
\path [line]
(3) edge [bend right=15] (merge)
(B) edge [bend right=37] (merge)
(E) edge [bend left=20] (merge)
(merge) edge [bend right=10] (index)
(merge) edge [bend left=10] (work)
(index) edge [bend right=35] node [near start] {(if no conflicts)} (F)
(old HEAD label) edge [dashed, bend left=35] (HEAD)
;
\end{tikzpicture}
\end{document}