forked from probinso/introduction-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.dot
41 lines (37 loc) · 1.82 KB
/
git.dot
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
digraph G {
aize = "4,4"
compound=true;
{
ExistingProject[label="Existing Project", shape=doublecircle];
NewProject[label="New Project", shape=doublecircle];
rank=same;
};
Local[label="Local Project"];
subgraph cluster0 {
label="Local With Remote";
color=lightgray;
style=filled;
UpToDate [shape=doublecircle, label="up-to-date"];
{Unstaged; Staged; rank=same;};
UpToDate -> Unstaged [label="Make changes\nSave changes"];
Unstaged -> Staged [label="git diff # to understand changes\ngit add <filenames...>"];
Staged -> UpToDate [label="git commit -m 'describe changes'"];
{Fetched; Conflict;
Point[shape=point, label=""];
rank=same;
}
Fetched -> Point [label="git merge <remote/branch>"];
Point -> {Conflict, UpToDate}
Conflict -> UpToDate [label="Resolve Merge Conflicts\ngit commit -a -m 'merge conflict'"];
};
Local -> UpToDate [
label="git remote add <remote> <url>",
lhead=cluster0];
NewProject -> Local [label="git init ."];
ExistingProject -> UpToDate [
label="# defaults to origin\ngit clone <url>"
lhead=cluster0];
UpToDate -> ExistingProject [label="git push <remote> <branch>"];
ExistingProject -> Fetched [label="git fetch <remote>"];
//ExistingProject -> Point [style=dashed, label="git pull <origin>"];
}