I\'m following the docs from the Git configuration page and trying to apply this to my Windows 7 environment. When I run say, \"git diff file0\" I get an error in P4Merge:>
I assume you're using Cygwin... I think the problem is that for Cygwin, /tmp exists, but for Windows, it doesn't (it's somewhere else). For me, Cygwin's /tmp is located in $HOME/AppData/cygwin/tmp and that's where the file was. This might be different depending on how you installed Cygwin. Once you find Cygwin's /tmp, it's just a matter of finding a good environment variable (or creating a new one, if you need) to get a Windows path to the temp file. This worked for me:
[diff]
tool = p4mergeTool
[difftool "p4mergeTool"]
cmd = p4merge.exe $HOMEPATH/AppData/cygwin$LOCAL $REMOTE
I used HOMEPATH instead of HOME, because (it appears) HOMEPATH is the Windows HOME environment variable (\Users\myusername), while HOME is the cygwin HOME environment variable (/cygdrive/c/Users/myusername). From Cygwin, type printenv to see which environment variables might be a good fit.