简体   繁体   English

强制git合并提交

[英]Force git to merge in commits

We have been trying to merge 2 branches together for a couple of days now yet we still have a few problems. 我们一直在尝试将两个分支合并在一起几天,但仍然存在一些问题。 Git appears to skip some commits that it believes are already in the branch. Git似乎跳过了一些它认为已经在分支中的提交。

If we run git branch --contains CommitHash then it shows the commit to be in the develop branch, however if we run git log on the folder the commit contains it doesn't show the commit in the branch. 如果我们运行git branch --contains CommitHash那么它将显示提交在开发分支中,但是,如果我们在文件夹中运行git log提交包含该提交,则不会在分支中显示提交。

Is there a way to force git to merge in these commits? 有没有办法强制git合并这些提交?

Any help would be appreciate as it 任何帮助将不胜感激

Andy 安迪

您可以使用git cherry-pick将这些提交强制到另一个分支,但是我不建议这样做,因为您可能只是在查看日志中的更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM