如何撤消git --abort [英] How to undo the git --abort
问题描述
是否可以撤消git abort。场景是我在运行命令 git merge 时合并了两个分支,它显示一条错误消息,表明您尚未提交更改,因此我运行 git commit ,现在出现消息存在严重错误合并冲突,请中止操作以解决问题,因此我运行命令 git merge --abort 。
之后,我也丢失了本地代码更改。有什么解决方案可以撤消中止操作或找回我的本地代码。
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.
推荐答案
不,不幸的是,如果您没有提交更改,在失败的合并开始到-中止
的那一刻之间,它们并没有保存在任何地方。
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).
这篇关于如何撤消git --abort的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!