git undo last merge' code example
Example 1: git undo comflicted merge
git merge --abort
Example 2: undo a git merge
git reset --hard HEAD~1
git reset --hard <commit_sha>
git merge --abort
git reset --hard HEAD~1
git reset --hard <commit_sha>