| Rebase |
| ------ |
| |
| [graphviz] |
| ---- |
| digraph { |
| node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18] |
| edge [style=bold, color="#385d8a", arrowhead=none, fontname=arial, fontsize=16] |
| |
| D -> C -> B -> A |
| F -> E [label=" diff-2", fontcolor=red, fontname=arial, fontsize=16] |
| E -> B [weight=0, label=" diff-1", fontcolor=red, labelfloat=true] |
| { rank=same; C; E } |
| { rank=same; D; F } |
| |
| EP -> D [weight=0, style=invis] |
| |
| D -> F [style=invis] |
| |
| FP [style=invis] |
| EP [style=invis] |
| FP -> EP [style=invis] |
| EP -> F [style=invis] |
| |
| edge [arrowhead=normal] |
| node [shape=box, style=filled, fillcolor=lightgrey, color=black] |
| HEAD [fillcolor="#555555", fontcolor=white] |
| master -> D |
| { rank=same; master; D } |
| |
| F -> feature1 [dir=back] |
| { rank=same; F; feature1 } |
| |
| feature1 -> HEAD [dir=back] |
| { rank=same; HEAD; feature1 } |
| } |
| ---- |
| |
| git rebase master |
| |
| * redo the work done in `feature1` branch on top of the `master` |
| |
| Rebase |
| ------ |
| |
| [graphviz] |
| ---- |
| digraph { |
| node [style=bold, shape=circle, color="#385d8a", fontname=arial, fontsize=18] |
| edge [style=bold, color="#385d8a", arrowhead=none, fontname=arial, fontsize=16] |
| |
| D -> C -> B -> A |
| F -> E [label=" diff-2", fontcolor=red, labelfloat=true] |
| E -> B [weight=0, label=" diff-1", fontcolor=red, labelfloat=true] |
| { rank=same; C; E } |
| { rank=same; D; F } |
| |
| EP -> D [weight=0, color=red, label=" diff-1", fontcolor=red, labelfloat=true] |
| |
| D -> F [style=invis] |
| |
| FP [label="F'", style=filled, fillcolor=coral1, color=red] |
| EP [label="E'", style=filled, fillcolor=coral1, color=red] |
| FP -> EP [color=red, label=" diff-2", fontcolor=red, labelfloat=true] |
| EP -> F [style=invis] |
| |
| edge [arrowhead=normal] |
| node [shape=box, style=filled, fillcolor=lightgrey, color=black] |
| HEAD [fillcolor="#555555", fontcolor=white] |
| feature1 [color=red, fontcolor=red] |
| master -> D |
| { rank=same; master; D } |
| |
| FP -> feature1 [dir=back, color=red] |
| { rank=same; FP; feature1 } |
| |
| feature1 -> HEAD [dir=back] |
| { rank=same; HEAD; feature1 } |
| |
| feature1_old [style=dashed, label=feature1, color=grey, fontcolor=grey] |
| F -> feature1_old [style=dashed, dir=back, color=grey] |
| |
| { rank=same; feature1_old; F } |
| } |
| ---- |
| |
| git rebase master |
| |
| * rebase current branch to another 'base' commit |
| * after rebase the fast-forward merge possible |