(This question is the opposite of this one)
How can I go from this
dev C - D / master A - B
to this?
dev D / master A - B - C
I know I'm going to kick myself when I see the answer, but for the moment I'm a bit stuck...
git branch -f <branchname> <commit>
git checkout master git merge C
With C
being the SHA1 of commit C
.
D (dev) / master A - B - C (move master HEAD)
It should be a fast-forward merge.
Necromancy, I know.
git branch -f master C
Will not touch current working tree at all - you can have your work in progress.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With