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