I branched a feature off develop. I made several commits on that feature branch. I then merged that feature branch back in develop & pushed everything to the origin.
I just noticed git did a fast forward which I didn't really want. Is it possible to revert that merge? In git log there is no commit for the merge (I wasn't asked for a comment either when I did it).
If it matters, nothing has changed since I pushed that merge.
If you still have the feature branch you can do the following:
WARNING: You should only do the following if you are 100% sure that nothing changed on develop since commits that you want to remove.
Find the SHA of the last commit on develop before the merge. (i.e. the state of develop before the merge)
execute the following while you are on the develop branch:
git reset --hard <sha-of-old-develop>
execute
git push -f
Now the repository should be back to how it was before you merged.
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