< Back to Coding

How to undo a pushed merge in Git

First use “git log” to find the commit hash of your merge and copy it somewhere.

Then use

git revert -m 1 <merge-commit-hash>

You can then recommit with the comment of “revert merge” or something similar

Leave a Reply

Your email address will not be published. Required fields are marked *