Git樱桃挑选和数据模型的完整性 [英] Git cherry pick and datamodel integrity
问题描述
经过一段时间后,需要将两个分支完全合并。 git会如何知道它已经提供了过去被樱桃采摘的承诺,以便它不会重新引入它?
您可能想要阅读
尝试樱桃选择vs合并工作流程,以便在合并和樱桃选择之间进行很好的比较,尤其是樱桃-pick不会存储父母身份,因此不会知道它已经提交了樱桃在过去的提交,以便它不会重新引入它。
和
http://davitenio.wordpress.com/2008/09/27/git-merge-after-git-cherry-pick-avoiding-使用 rebase
。
来重复提交/ 关于如何避免重复提交的提交
Given that two branches have diverged and a specific commit from one branch (and not everything) needs to be introduced to the other, git cherry pick achieves exactly that.
After some time there is the need to completely merge the two branches. How will git know that it has already the commit that was cherry picked in the past so that it won't reintroduce it?
You might want to read
Git Cherry-pick vs Merge Workflow for a good comparison between merge and cherry-pick, especially that cherry-pick does not store parent id, and thus will not know that it has already the commit that was cherry picked in the past so that it won't reintroduce it.
and
http://davitenio.wordpress.com/2008/09/27/git-merge-after-git-cherry-pick-avoiding-duplicate-commits/ about how to avoid duplicating commits in this case, using rebase
.
这篇关于Git樱桃挑选和数据模型的完整性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!