blob: 2163d434844155bae450c1984902f0e8c6c1fc67 [file] [log] [blame]
Push
----
[graphviz]
----
digraph {
// commit graph left
node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18]
edge [style=bold, color="#385d8a", arrowhead=none]
D -> C
C -> B [weight=0]
B -> A
// branch pointers
edge [arrowhead=normal]
node [shape=box, style=filled, fillcolor=lightgrey, color=black]
HEAD [fillcolor="#555555", fontcolor=white]
master [label="origin/master", fillcolor=lightskyblue]
{ rank=same; HEAD; feature; D}
feature -> D [weight=0]
HEAD -> feature [weight=0]
{ rank=same; master; B }
master -> B [weight=0]
// graph name
local [label="local repo", style=none, color=none]
A -> local [style=invis]
// formatting: Add invisible node to have the feature branch in an
// own column
I [style=invis]
C -> I [style=invis]
{ rank=same; A; I }
// commit graph right
node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18]
edge [style=bold, color="#385d8a", arrowhead=none]
A1 [label="A"]
B1 [label="B"]
B1 -> A1
// branch pointers
edge [arrowhead=normal]
node [shape=box, style=filled, fillcolor=lightgrey, color=black]
master1 [label="master"]
{ rank=same; master1; B1 }
master1 -> B1 [weight=0]
// graph name
remote [label="remote 'origin' repo", style=none, color=none]
A1 -> remote [style=invis]
// align left and right graph
{ rank=same; A; A1}
// spacing in between the left and right graph
{ rank=same; master; space}
space [style=invis, label="some space here"]
space -> master [style=invis, weight=0]
}
----
`Q:` Which commits get pushed?
Push
----
[graphviz]
----
digraph {
// commit graph left
node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18]
edge [style=bold, color="#385d8a", arrowhead=none]
C [style=filled, fillcolor=coral1, color=red]
D [style=filled, fillcolor=coral1, color=red]
D -> C
C -> B [weight=0]
B -> A
// branch pointers
edge [arrowhead=normal]
node [shape=box, style=filled, fillcolor=lightgrey, color=black]
HEAD [fillcolor="#555555", fontcolor=white]
master [label="origin/master", fillcolor=lightskyblue]
{ rank=same; HEAD; feature; D }
feature -> D [weight=0]
HEAD -> feature [weight=0]
{ rank=same; master; B }
master -> B [weight=0]
// graph name
local [label="local repo", style=none, color=none]
A -> local [style=invis]
// formatting: Add invisible node to have the feature branch in an
// own column and to keep master branch on the right
node [style=invis]
edge [style=invis]
I -> B
{ rank=same; A; I2 }
A -> I2
master -> I2
// the "push" arrow
node [style=invis]
L -> R [label="push", style=dotted, penwidth=2, arrowhead=vee,
color=red, fontname=arial, fontsize=30]
// commit graph right
node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18]
edge [style=bold, color="#385d8a", arrowhead=none]
C1 [label="C", style=filled, fillcolor=coral1, color=red]
D1 [label="D", style=filled, fillcolor=coral1, color=red]
A1 [label="A"]
B1 [label="B"]
D1 -> C1 [color=red]
C1 -> B1 [color=red]
B1 -> A1
// branch pointers
edge [arrowhead=normal]
node [shape=box, style=filled, fillcolor=lightgrey, color=black]
master1 [label="master", color=red, fontcolor=red]
{ rank=same; master1; D1 }
master1 -> D1 [weight=0, color=red]
masterold1 [label="master", style=dashed, color=grey, fontcolor=grey]
{ rank=same; masterold1; B1 }
masterold1 -> B1 [weight=0, style=dashed, color=grey]
// graph name
remote [label="remote 'origin' repo", style=none, color=none]
A1 -> remote [style=invis]
// formatting: Add invisible node to keep old master branch on the
// right
node [style=invis]
edge [style=invis]
{ rank=same; A1; I3 }
A1 -> I3
masterold1 -> I3
// align left, right and arrow graph
{ rank=same; A; A1; L; R }
// spacing in between the left and right graph
{ rank=same; master; space}
space [style=invis, label="some space here"]
space -> master [style=invis, weight=0]
{ rank=same; HEAD; space2 }
space2 [label="spaace"]
space2 -> HEAD [weight=0]
}
----
`Q:` Which commits get pushed?
`A:` *ALL* commits from the local branch not available in the remote
branch