Last active
February 3, 2022 21:41
-
-
Save chris-skud/30a0be29e7dda381a76325439df2bf3a to your computer and use it in GitHub Desktop.
Steps to manage a feature branch that has a dependency on another feature branch
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
A--BC <-- master | |
\ | |
B--C <-- feature-1 | |
\ | |
D--E <-- feature-2 | |
after feature-1 merges into master, and whilst on feature-2 use: | |
`git fetch origin` | |
`git rebase --onto origin/master feature-1` | |
--onto will tell Git to copy commits D and E (only) with the copies going after commit BC, like this: | |
D'-E' <-- feature-2 (HEAD) | |
/ | |
A--BC <-- master | |
\ | |
B--C <-- feature-1 | |
\ | |
D--E (now abandoned) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment