Here’s a little tip for those of you looking for a good diff/merge tool. It works quite well with both TortoiseSVN and Git Extensions and I’m sure it works with other applications as well.
Some of you may have heard of Perforce. It’s a pretty expensive source control system that is used by Google among others. I have never used it myself but I guess it’s ok. What I do know is that they have a great tool called P4Merge for merging and checking file differences. Best of all is that you can use it for free!
This is what a comparison looks like:
Installing
To use P4Merge you need to install the Perforce Visual Client which is available as a free download from the Perforce download page. Make sure you get the right version for your system.
When you install it you can uncheck all the other tools and just install P4Merge:
TortoiseSVN setup
To use P4Merge with TortoiseSVN you need open the TortoiseSVN settings and configure Diff Viewer and Merge Tool like this:
Diff Viewer:
“C:\Program Files\Perforce\p4merge.exe” %base %mine
Merge Tool:
“C:\Program Files\Perforce\p4merge.exe” %base %theirs %mine %merged
Here’s how it looks for the Merge Tool setting:
Git Extensions
It’s pretty easy to configure Git Extensions to use P4Merge. All you have to do is to open up the settings and choose “p4merge” in the Mergetool dropdown. The correct paths should be filled in automatically for you.
That’s it – now you can enjoy a pretty nice tool for free!
Comments on: "Using a cool merge tool with SVN or GIT" (7)
That’s a good one, even one year later! Thanks a lot!
Thanks! I like it too 🙂
I’m newer. It tried to looking some merge tools. I think It’s a good tools but how can I use it from command line?
I tried to use it with git extentions and the result is very frustrating – after merge the diff tool shows that all the old (base) lines are deleted (-) and the same lines (+ the merge change) are added (+). It’s far not ideal behaviour 😦
Hmm, that’s weird. It’s working correctly on my machine (Windows). But I think I had a problem with the CRLF setting in Git once that changed all the newlines in the files. Maybe that is what is causing your problems? Try checking the settings for newlines in Git and see if that helps.
[…] or Git with their respective Tortoises, you need to specify the command line in the options dialog: Using a cool merge tool with SVN or GIT tells you how. Team Foundation Server is somewhat more complicated, but still doable: Using P4Merge […]
Love using P4Merge, thanks for the quick setup info for TortoiseSVN.
One quick thing though, I had to remove the quotes from the path to the merge tool to get it to work on Win 7 with TortoiseSVN 1.7.7. Might help someone else out.