简体   繁体   中英

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.

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 . What you want is for git to pass that argument to Beyond Compare. This command will change your configuration for every future use of 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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