[英]How to deal with accidentally merging master into feature branch?
I tried to resolve merge conflict in a wrong repository, so I merged the master branch into a feature branch in the repository, which I shouldn't have done. 我试图解决错误的存储库中的合并冲突,因此我将master分支合并到了存储库中的功能分支中,这是我不应该做的。
How can i undo/correct that mistake? 我如何撤消/纠正该错误?
Can that cause some problem later on? 以后会引起一些问题吗? For example, when I try to pull to the master branch from a remote repository?
例如,当我尝试从远程存储库拉到master分支时?
Thanks. 谢谢。
Just do: 做就是了:
git reset --hard HEAD^
That will put you right back to before you did the merge. 这将使您回到合并之前的状态。 Then you can checkout the branch you should be on and do the correct merge.
然后,您可以签出您应该位于的分支并进行正确的合并。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.