自动修复一个小的合并冲突

Automatically fix a minor merge conflict

当我在我的 vagrant botstrap 中开始合并时,我遇到了合并冲突:

==> git merge --no-ff testing/other
==> gc-gw0: Auto-merging manifests/fastd.pp
==> gc-gw0: CONFLICT (content): Merge conflict in manifests/fastd.pp
==> gc-gw0: Automatic merge failed; fix conflicts and then commit the result.

这将阻止 bootstrap 运行,尽管冲突非常小。

我如何自动获取脚本中该文件的"other"分支的版本?

我用

解决了这个问题
git merge --no-ff -X theirs testing/other

如果发生冲突,这将采用 "other" 的版本

参见: