I've managed to successfully wire up P4Merge with TortoiseGit through this tutorial.
However, given I'm spending most of my time in the IDE (Visual Studio 2015), I'd like to also set this one up to use P4Merge as a diff tool.
Previously (aka while working with TFS), this would be enough. However, given I'm now using git, there's no option in VS to wire it up this way:
However, I found out how to Configure User Tools through the Visual Studio 2015 Tools Developer Command Prompt and
tf diff /configure
I am assuming that you have P4Merge installed in the default install directory, if not edit the directory accordingly in the commands listed below.
Execute these commands in the command line to set Git's default mergetool and difftool to P4Merge.
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
git config --global diff.tool p4merge
git config --global difftool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
After that, whenever git difftool is launched it will start p4merge.
However, it can still be that on the repository level there is still a setting that overrides the global settings, this is located in
You can manually edit the config file, or you can open up a command line, change directory into the repository and change the default merge and difftool with the following commands.
git config --local merge.tool p4merge
git config --local mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
git config --local diff.tool p4merge
git config --local difftool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"