Revert merge commit from remote


If you want to revert a merge commit on remote origin, then you can do that with the following commands:

git revert -m 1 <commit-hash> 
git push -u origin <branch-name>

Explanation regards -m options from StackOverflow:

In git revert -m, the -m option specifies the parent number. This is needed because a merge commit has more than one parent, and Git does not know automatically which parent was the mainline, and which parent was the branch you want to un-merge.