How to undo a git merge squash?

How to undo a git merge squash?

If you run git merge --squash <other-branch> the working tree and index are updated with what the result of the merge would be, but it doesn't create the commit. All you need to do is to run:

git commit

However, if you change your mind before committing and just want to abort the merge, you can simply run:

git reset --merge

You don't need to use the reflog.

posted @ 2020-03-31 17:22  ChuckLu  阅读(192)  评论(0编辑  收藏  举报