When calling git difftool
in a repository, git compares the modified files in the local repository with their match in the remote. To do so, it creates a temporary file for the remote, sets the variables LOCAL
and REMOTE
and calls whichever tool is specified for diffs in git's config.
By default, the temporary file is created in /tmp/<hash>_filename
. Is it possible to change this default location?
Why would you do that?
Long story short, I'm using git via windows subsystem for linux and I want to use a windows tool to do diff and merge. The problem is, /tmp
is not accessible from the Windows side, so I'd need to move the default location where git creates temporary files to somewhere accessible by Windows.
What I tried:
So far, all I could find was a suggestion to sudo mount -B /tmp /mnt/c/tmp
but this doesn't seem to work (/tmp
still points to the same directory as before...)