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
, proceeded as in the previous tutorial with the .bat files, but it doesn't seem to do anything for me.
I'm probably missing something, but hoping that given how popular P4Merge, VS (& git) are nowadays, there have to be people who've managed to already achieve this by now.
P4Merge. Perforce, the company best known for its enterprise version control platform, also offers a solid diff tool: P4Merge is free of charge and comes with a basic feature set that makes it an interesting option on Windows, macOS and Linux.
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 .git/config
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With