can you undo a merge git code example Example 1: abort merge git git merge --abort Example 2: revert last merge git git revert -m 1 commit_hash