git-rebase
手册页提到-X<option>
可以传递给git-merge
。具体什么时候/如何?
我想通过应用补丁来变基递归的战略和theirs选项(应用任何坚持的内容,而不是跳过整个冲突的提交)。我不想合并,我想让历史线性化。
我试过了:
git rebase -Xtheirs
and
git rebase -s 'recursive -Xtheirs'
但 git 拒绝-X
在这两种情况下。
git rebase -Xtheirs
在最新版本中有效,但需要手动解决树冲突。你需要跑git rebase -Xtheirs --continue
(with -X
重复)解决这些冲突后。
您可以将其与 Git v1.7.3 或更高版本一起使用。
git rebase --strategy-option theirs ${branch} # Long option
git rebase -X theirs ${branch} # Short option
(这是git rebase --strategy recursive --strategy-option theirs ${branch}
正如所述文档)
来自 Git v1.7.3 发行说明:
git rebase --strategy <s>
学到了--strategy-option
/-X
选项传递所选合并策略可以理解的额外选项。
NB: “我们的”和“他们的”的意思与他们在直接合并期间所做的相反。换句话说,“他们的”有利于对current branch.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)