我可以只合并Git中没有冲突的更改吗? [英] Can I merge only non-conflicting changes in Git?
本文介绍了我可以只合并Git中没有冲突的更改吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能简单地(例如在一个命令中?)在Git中合并,保持冲突文件的状态与当前分支一样,并且不像每个文件的选项那样单独指定每个文件?
git checkout master
git merge stable --some-option-to-keep-files-?
解决方案
合并策略有一个我们的你想要什么
git merge -s recursive -X我们的远程/分支
正如manpage所强调的,这不是git merge -s我们的。
How can I simply (e.g. 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 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.
这篇关于我可以只合并Git中没有冲突的更改吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文