如何使用递归策略提供的耐心选项将分支与git合并?我正在使用git版本1.7.3.1.msysgit.0
甚至文档也不一致,而且与实际命令输出的不同.
git merge [-s
<strategy>
] [-X<strategy-option>
]<commit>
进一步的文字:
-X
<option>
(没有空间)
命令输出说:
-X, --strategy-option <option=value>
option for selected merge strategy
Run Code Online (Sandbox Code Playgroud)
所以我尝试了几个版本,结果如下:
$ git merge -s recursive -Xpatience sourceBranch
fatal: Unknown option for merge-recursive: -Xpatience
$ git merge -X patience sourceBranch
fatal: Unknown option for merge-recursive: -Xpatience
$ git merge -Xpatience sourceBranch
fatal: Unknown option for merge-recursive: -Xpatience
$ git merge --strategy-option patience sourceBranch
fatal: Unknown option for merge-recursive: -Xpatience
$ git merge -X option=patience sourceBranch
fatal: Unknown option for merge-recursive: -Xoption=patience
$ git merge --strategy-option option=patience sourceBranch
fatal: Unknown option for merge-recursive: -Xoption=patience
$ git merge option=patience sourceBranch
fatal: 'option=patience' does not point to a commit
$ git merge -X option=patience sourceBranch
fatal: Unknown option for merge-recursive: -Xoption=patience
Run Code Online (Sandbox Code Playgroud)
看起来该选项没有实现......
Mar*_*air 33
将--patience
用于选择git merge-recursive
引入的承诺58a1ece478c6038a7eb0b6e494d563bd5e6d5978
.您可以在克隆中找到git.git
包含此更改的版本git tag --contains 58a1ece478
:
v1.7.4
v1.7.4-rc0
v1.7.4-rc1
v1.7.4-rc2
v1.7.4-rc3
v1.7.4.1
Run Code Online (Sandbox Code Playgroud)
所以我怀疑你只是使用了一个稍微过时的mSysGit版本.现在有一个1.7.4的预览版本 - 我想你应该尝试一下.
我刚用git版本1.7.4尝试过这个,以下命令行语法对我有用:
git merge -s recursive -X patience other-branch
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
11260 次 |
最近记录: |