how to remove merge head in git code example Example 1: abort merge git git merge --abort Example 2: git abort merge git merge --abort