Description: The below how to demo how to set up the diff tool to git on windows with `WinMerge`.
Ref Links:
Find out the git configuration location
#This command shows the git configuration location
git config --list --show-origin
Let’s say use the ~/.gitconfig
vim ~/.gitconfig
#=== Append lines below
# $BASE => the temp directory path
# $LOCAL => the first diff commit
# $REMOTE => the second diff commit
[difftool "winmerge"]
cmd = {path to winmerge.exe e.g. /Y/Softwares/WinMerge/WinMergeU.exe} -e -u -r -wl -wr -dl \"$BASE\" -dr \"$BASE\" \"$LOCAL\" \"$REMOTE\"
#=== Diff by
git difftool -y --dir-diff {first commit} {second commit}