问题
I merged the wrong remote repo master branch into my local master branch, once I started resolving conflicts I realized my horrible mistake. However, I didn't completely resolve the conflicts and therefore didn't commit the merge.
Also, I committed my last changes to my local master copy before starting the merge. How do I successfully revert to the last local commit before the bad merge?
回答1:
If you still are in the merge state, you can try
git merge --abort
to check what state you are in
git status
来源:https://stackoverflow.com/questions/30315263/reverting-a-bad-git-merge-from-github