git local merge revert code example Example 1: git revert merge git revert -m 1 <merge-commit> Example 2: revert last merge git git revert -m 1 commit_hash