Setup Beyond Compare as GIT Mergetool on GNU/Linux
1 min readMay 1, 2021
I like to use Beyond Compare (https://www.scootersoftware.com/) to resolve my git conflicts. Setting it up on Linux with git can be tricky. Let me guide you through the process.
- The first step is to verify that we have a recent version of git installed. This can be accomplished by executing “git version” command. Anything higher than version 1.8 is fine.
- Second step is to check if beyond compare was installed correctly. You can verify this by executing the bcompare command. I am using the Pro version.
- Next open the .gitconfig file in your home directory and append the following lines:
[diff]
tool = bc3[difftool "bc3"]
trustExitCode = true[merge]
tool = bc3[mergetool "bc3"]
trustExitCode = true
cmd = /usr/bin/bcompare $LOCAL\n $REMOTE -savetarget=$MERGED[mergetool]
keepBackup = false
Now Beyondcompare should startup if you run into a conflict. You can start the merge process using the git mergetool command.