![](/img/trans.png)
[英]With git, how to force overwrite a file in one branch, from a file in another branch (bypass merge), and commit?
[英]How to merge a previous commit of one file from another branch
我以为我可以做到这一点,但后来我开始键入命令,就像让我们备份并确保我正确执行了!
先感谢您!
获取提交ID,切换到要合并的分支并执行cherry-pick,如下所示:
git checkout another-branch
git cherry-pick commit-id-hash
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.