how to revert from 2 merge in git code example Example 1: git revert merge git revert -m 1 <merge-commit> Example 2: cancel a merge git git merge --abort