git needs merge abort code example Example 1: abort merge git git merge --abort Example 2: git stop merge git reset --hard HEAD