从GitHub恢复不良的git合并 [英] Reverting a bad git merge from GitHub
本文介绍了从GitHub恢复不良的git合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将错误的远程repo master分支合并到我的本地master分支中,一旦我开始解决冲突,我就意识到了自己可怕的错误.但是,我没有完全解决冲突,因此没有提交合并.
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?
推荐答案
如果您仍处于合并状态,则可以尝试
If you still are in the merge state, you can try
git merge --abort
检查您处于什么状态
git status
这篇关于从GitHub恢复不良的git合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文