gpt4 book ai didi

git merge --strategy 与 --strategy-option

转载 作者:太空狗 更新时间:2023-10-29 14:25:56 26 4
gpt4 key购买 nike

git merge选项有什么区别--strategy-option(短-X)和--strategy(短-s)?

有很多关于 merge strategies 的问题.但是没有人解释这些选项之间的区别。

还有 git documentation没有帮助:

--strategy-option Pass merge strategy specific option through to the merge strategy.

最佳答案

TL;DR: -s 用于指定 merge 策略 -X 用于为所述策略提供选项。

git 文档说:

-s <strategy>
--strategy=<strategy>

使用给定的 merge 策略;可以多次提供以按照应尝试的顺序指定它们。如果没有 -s 选项,则使用内置的策略列表( merge 单个头时使用 git merge-recursive,否则使用 git merge-octopus)。

-X <option>
--strategy-option=<option>

将 merge 策略特定选项传递给 merge 策略。

此外,在 MERGE STRATEGIES 章节的下方解释了所有可用的策略及其选项。

关于git merge --strategy 与 --strategy-option,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47753551/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com