If you are using Windows with WSL you can configure git to use your windows diff and merge tools in both worlds (Linux and Windows).
Setting up .gitconfig for windows is trivial but for Linux it is not. In my case I'm using Beyond Compare 3 (installed on Windows) and I have git configured in both, Windows and Linux, to use it as merge and diff tools.
I'll describe how I have my .gitconfig file configured in Linux. I'm using Ubuntu 20.04 but I guess it should be similar in other distributions. Luckily, no extra setup is required for the merge tool.
Configuring the merge tool
This part is pretty simple, you just need to add the following configuration in your .gitconfig file:
[merge]
tool = bc
[mergetool]
keepBackup = false
trustExitCode = true
prompt = false
[mergetool "bc"]
path = /mnt/c/Program Files/Beyond Compare 4/bcomp.exe
There are a few extra optional settings but you can simply use it as I do
One important thing to notice is that mergetool path. In my case I have Beyond compare installed in my c windows drive
Configuring the diff tool
For the diff tool things are a little more complicated and it requires a little more effort. The first thing you need to do is to create a separate executable. I'm not sure why this is required but git docs say this so.
In my case, I created my own executable at \\wsl.localhost\Ubuntu\home\{your-user}\.local\bin\extDiff and I gave it execution permissions chmod +x extDiff
This are its contents
#bin/bash
"/mnt/c/Program Files/Beyond Compare 4/bcomp.exe" "$1" "$2"
The only missing thing is to update .gitconfig file
[diff]
tool = bc
[difftool]
prompt = false
[difftool "bc"]
cmd = /home/{your-user}/.local/bin/extDiff `wslpath -m "$REMOTE"` `wslpath -m "$LOCAL"`
wslpath is a program that converts linux to windows paths and viceversa. In this case I'm calling my previously defined executable passing the $REMOTE and $LOCAL vars provided by git during execution. Notice that I have to convert the current Linux paths into Windows paths
Now everything is set up. Next time you run git difftool or git mergetool Windows' Beyond Compare will be launched.