“可能由于冲突解决"做什么?在空的摘樱桃消息中意味着什么? [英] What does "possibly due to conflict resolution" mean in the empty cherry-pick message?
问题描述
当您尝试挑选当前分支中已经存在的提交时,消息
When you try to cherry-pick a commit that is already in the current branch, the message
The previous cherry-pick is now empty, possibly due to conflict resolution.
将显示.
意思很清楚.
但是,该消息显然涵盖了其他情况,而我不理解另一种情况-可能是由于解决冲突所致.解决冲突的方法如何使提交为空?
However, the message clearly covers some other situation and I don't understand the other case - possibly due to conflict resolution. How can a conflict resolution make a commit empty?
推荐答案
当您选择提交时,git尝试应用补丁.可能有以下三种结果:
When you cherry pick a commit, git tries to apply a patch. Three outcomes are possible:
- 没有变化,因为该补丁已经存在于祖先(例如,当您尝试两次尝试摘樱桃时)
- 已应用一些更改
- 文件冲突
如果文件中存在冲突,则可以对其进行编辑,称为冲突解决".编辑它们的一种方法是删除所有在Cherry-Pick中添加的更改.当您这样做时,您最终将无处进行任何更改,但仍在进行中.这就是为什么此提示说可能是由于解决冲突"的原因.
If there are conflicts in files, you can edit them, called "conflict resolution". One way of editing them is to remove all the changes that the cherry-pick would have added. When you do so, you end up with no more changes anywhere, but still the cherry-pick being in progress. That's why this hint says "possibly due to conflict resolution".
这篇关于“可能由于冲突解决"做什么?在空的摘樱桃消息中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!