gpt4 book ai didi

mercurial - 强制 merge 分支

转载 作者:行者123 更新时间:2023-12-02 19:51:21 27 4
gpt4 key购买 nike

是否有任何方法可以强制将分支 A merge 到分支 B 中,其中所有可能的冲突都将得到有利于分支 B 的解决?

总而言之,如何在不存在冲突的情况下将最后一个分支 B 修订推送到分支 A 中?

最佳答案

您可以使用 hg merge --tool internal:other 决定将一个分支的所有内容置于另一个分支之上或hg merge --tool internal:local

我不确定您想要哪种方式 merge ,但如果您想将 A merge 到 B 中并获取 B 中的所有更改,那么您将执行以下操作:

> hg update B
> hg merge A --tool internal:local
> hg commit -m "Merge"

internal:local merge 工具将采用当前修订版(由于 hg update B 而为 B)中的更改来覆盖其他修订版 internal:other 中的更改。将从 A 获取所有更改。

有关更多信息,请使用以下命令:hg help mergehg help merge-tools

关于mercurial - 强制 merge 分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15269060/

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