git解决以前的合并冲突 [英] git resolving previous merge conflicts

查看:119
本文介绍了git解决以前的合并冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦我将我的分支与另一个分支合并了. 我没有解决所产生的冲突. 直到最近,我一直在合并,直到我发现很多<<<<"被添加到我的代码中. 我认为这与未解决的合并冲突有关. 我尝试用他们的"策略解决上一次合并中的冲突. 不幸的是,它对以前未解决的冲突没有任何影响. 我该如何通过他们的策略"解决所有未解决的冲突?

Once I've merged my branch with another. I haven't resolve the conflicts that were made. I have been merging till recently, till I figured out that lots of "<<<<" were added to my code. I believe it's related to the unresolved merge conflicts. I try to solve the conflicts in my last merge with "theirs" strategy. Unfortunately, it didn't have any effect on the previous unresolved conflicts. How do I resolve all the unresolved conflicts with the "theirs strategy"?

谢谢!

推荐答案

尝试重置代码,然后再次合并代码.

try reset the code then merge the code again.

假设您在branchA上并想合并branchB

say you are on branchA and want to merge branchB

git reset --hard branchA

git merge -X theirs branchB

这篇关于git解决以前的合并冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆