how to abort a git merge in terminal code example Example 1: cancel merge git merge --abort Example 2: abort merge git git merge --abort