Not sure if that helps, but recent versions of Git support P4Merge (I am using git version 2.17.0. Windows through MSYS2).
You can determine if this is the case by running git difftool --tool-help . It will list the available tools that Git can use (because they found them in your %PATH% ), and the tools that it could use (if they were installed).
If p4merge is on this list, you just need to add the path where p4merge.exe is in your %PATH% (on Windows, I recommend the Rapid Environment Editor for this).
After this is done, you need the following configuration file to be in your .gitconfig
[diff] tool = p4merge [merge] tool = p4merge
and nothing more. So remove other things like difftool.path and all that.
Then just use git difftool or git mergetool .
Note : I had a repository in which even if I had executed git difftool or git mergetool P4Merge would not start. I'm not sure what the problem was in this repo. However, I tried to create an empty repository somewhere on my disk using git init , add a file, commit it, then modify it, then I tried to use difftool and it worked. So, if the above description does not work for you, most likely the problem is different. Hope this helps.
source share