简体   繁体   English

在使用Beyond Compare解决合并后的冲突时设置优先级

[英]Set priority when using Beyond Compare to solve conflicts after a merge

I can see on the Beyond Compare option list for the mergetool that one can specify to favor the right or the left side with -favorright or -favorleft option. 我可以在mergetool的“ 超越比较”选项列表中看到,可以使用-favorright-favorleft选项将其指定为偏向右侧或左侧。

If I try to use it I get an error 如果我尝试使用它,则会收到错误消息

$git merge master

[...](Actual merge with some conflicts)

$git mergetool -favorright
usage: git mergetool [--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [-O<orderfile>] [file to merge] ...

You are passing the -favorright argument to git . 您正在将-favorright参数传递给git What you want is for git to pass that argument to Beyond Compare. 您想要的是git将参数传递给“超越比较”。 This command will change your configuration for every future use of git mergetool . 此命令将更改您的配置,以供将来将来使用git mergetool使用。

$ git config --global mergetool.bc3.cmd "/usr/bin/bcompare -favorright \$LOCAL
\$REMOTE \$BASE \$MERGED"

You may need to substitute /usr/bin/bcompare for the correct path to the Beyond Compare executable on your system. 您可能需要用/usr/bin/bcompare替代系统上Beyond Compare可执行文件的正确路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM