Created
June 15, 2010 21:13
-
-
Save kblin/439745 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start: my_branch diverges from master at commit A, master HEAD is B | |
-------X---Y--Z my_branch | |
/ | |
--------------A-----------B master | |
Now, you cherry-pick over Y, because it's a bug fix or the like.. | |
(And some more patches) | |
-------X---Y--Z my_branch | |
/ | |
--------------A-----------B-Y--C master | |
now I do git rebase master | |
1. my_branch is detached from master | |
-------X---Y--Z my_branch | |
--------------A-----------B-Y--C master | |
(2. the "fork" of the trees is moved forward from A to C) | |
-------X---Y--Z my_branch | |
/ | |
--------------A-----------B-Y--C master | |
3. the patches from my_branch are re-applied on top of B | |
While doing this, git notices Y is already in master, and skips it | |
-------X-----Z my_branch | |
/ | |
--------------A-----------B-Y--C master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start: my_branch diverges from master at commit A, master HEAD is B | |
-------X my_branch | |
/ | |
--------------A-----------B master | |
now I do git rebase master | |
1. my_branch is detached from master | |
-------X my_branch | |
--------------A-----------B master | |
(2. the "fork" of the trees is moved forward from A to B) | |
-------X my_branch | |
/ | |
--------------A-----------B master | |
3. the patches from my_branch are re-applied on top of B | |
-------X my_branch | |
/ | |
--------------A-----------B master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment