简体   繁体   English

我可以只合并Git中的非冲突更改吗?

[英]Can I merge only non-conflicting changes in Git?

How can I simply (eg in one command?) merge in Git, keeping the state of conflicting files as in the current branch and without specifying each file individually as in theirs/ours options? 我怎样才能简单地(例如在一个命令中?)在Git中合并,保持当前分支中的冲突文件的状态,而不像在他们/我们的选项中那样单独指定每个文件?

git checkout master
git merge stable --some-option-to-keep-files-?

The merge strategy has an "ours" option which is what you want 合并策略有一个“我们的”选项,这是你想要的

git merge -s recursive -X ours remote/branch

As the manpage stresses out, this is NOT git merge -s ours. 正如manpage强调的那样,这不是我们的git merge。

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

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