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

Pau*_*aul 5 git git-merge merge-conflict-resolution

我怎样才能简单地(例如在一个命令中?)在 Git 中合并,将冲突文件的状态保持在当前分支中,而不像在他们/我们的选项中那样单独指定每个文件?

git checkout master
git merge stable --some-option-to-keep-files-?
Run Code Online (Sandbox Code Playgroud)

syl*_*eux 5

合并策略有一个“我们的”选项,这正是您想要的

git merge -s recursive -X ours remote/branch
Run Code Online (Sandbox Code Playgroud)

正如联机帮助页强调的那样,这不是 git merge -s 我们的。