how to stop a git merge code example Example 1: git merge abort git merge --abort Example 2: git stop merge git reset --hard HEAD