'git with Beyond Compare (4) on WSL2 Windows 11 not opening the repo version
Trying to get git and Beyond Compare to place nicely together on WSL. Here is the output from git config --list:
diff.tool=bc3
difftool.prompt=false
difftool.bc3.path=/mnt/c/Program Files/Beyond Compare 4/BComp.exe
merge.tool=bc3
mergetool.prompt=false
mergetool.bc3.trustexitcode=true
mergetool.bc3.path=/mnt/c/Program Files/Beyond Compare 4/BComp.exe
Here is my ~/.gitconfig:
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
path = /mnt/c/Program Files/Beyond Compare 4/BComp.exe
[merge]
tool = bc3
[mergetool]
prompt = false
[mergetool "bc3"]
trustExitCode = true
path = /mnt/c/Program Files/Beyond Compare 4/BComp.exe
my git --version is:
git version 2.25.1
When I try git difftool file_in_git_repo
Beyond Compare opens with the current version in the left pane, but nothing in the right pane (I have confirmed the file exists in the git repo.)
.git/config has no entries referencing diff or merge
Any suggestions would be most welcome
========================================================================
Similar to VonC's suggestion, I was able to get it working with this in my .gitconfig file (disclaimer - I have not used the mergetool with this new method):
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
cmd = '/mnt/c/Program Files/Beyond Compare 4/BComp.exe' \"$(wslpath -aw $LOCAL)\" \"$(wslpath -aw $REMOTE)\"
[merge]
tool = bc3
[mergetool]
prompt = false
[mergetool "bc3"]
trustExitCode = true
cmd = '/mnt/c/Program Files/Beyond Compare 4/BComp.exe' \"$(wslpath -aw $LOCAL)\" \"$(wslpath -aw $REMOTE)\"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
