Reputation: 35141
So I merged a branch, "badBranch", into my develop branch, and discovered several commits after merging that it was buggy.
I did a revert: git revert -m 1 <commit hash of the merge>
Worked great. Time moved on, code was written, further changes were committed on develop.
Now, having more leisure, I want to merge badBranch back into develop (or develop into it) to see if I can fix it.
But develop thinks that badBranch is in its history (I think?), so when I checkout badBranch and merge develop into it, I just get the current state of develop.
How can I force an actually merge of devleop and badBranch?
Thanks.
Upvotes: 3
Views: 96
Reputation: 28951
It is surprisingly straightforward - just revert the revert:
git revert <commit hash of your merge revert>
The howto link by Marco also offers the next solution: rebase the badBrahcn with -no-ff
to recreate all commits (all the SHA IDs will be different) and merge it to the master.
Upvotes: 6
Reputation:
I don't know if this will work, but what if you checkout
ed badBranch and merge
d in develop and then checkout
ed develop and merge
d in badBranch?
Upvotes: 0