问题
Is it possible to undo the git abort. Scenario is that I was merging two branches when run command git merge its shows an error message you have uncommitted changes, therefor I run git commit now message appears "fatal error there is a merge conflict between, abort the operations to resolve the issue", so I run the command git merge --abort. After this i lost my local code changes too. Is there any solution to undo abort or get my local code back.
回答1:
No, unfortunately if you didn't commit your changes in between the moment the failed merge started and the --abort
, they haven't been saved anywhere.
You'll have to not only redo your merge but also these changes (though it might be a good idea to do so separately).
回答2:
Undoing the abort is basically redoing the merge.
So, rerun the git merge
to restart, solve the conflicts using git mergetool
and finally run git commit
to finalise the merge.
If you don't know how to use git mergetool
, here is a guide about it: https://gist.github.com/karenyyng/f19ff75c60f18b4b8149
回答3:
The straight answer is NO if you looking around git since there won't record for your uncommitted and deleted local changes but you can check your IDE and check that is there anything you can get from local history.
来源:https://stackoverflow.com/questions/55474092/how-to-undo-the-git-abort