GUI Merge Tool for Git on Windows

So Git doesn’t come with a GUI based merge tool out of the box, which is fine. It’s rather easy to configure Git to use a visual 3-way diff tool.  Here’s some tips on how to setup a GUI merge tool for Git on Windows.

Which one to choose?

Well, that’s a personal choice. Popular ones for Windows seems to be either kdiff3 or P4V visual client.

Here, I will go through the steps to setup the P4Merge: Visual Merge Tool.

First, download the client from Perforce download page.

Start the setup and select only the “Visual Merge Tool” feature:

Select the Visual Merge Tool feature
Select the Visual Merge Tool feature

After the installation has finished, you will need to configure Git to use it. Open a Git bash and type in these two commands;

git config –global merge.tool p4merge
git config –global mergetool.p4merge.cmd ‘”c:\Program Files\Perforce\p4merge.exe” “$BASE” “$LOCAL” “$REMOTE” “$MERGED”‘

That should do it. You can now do visual merging using:

git mergetool

You can also do visual diffs using:

git difftool


How to really uninstall Java 7 JRE on Mac OS X

Thanks to this stupidity from Oracle, I needed to uninstall Java 7 and go back to the Java v6 runtime.

(Hey, Oracle, this bug was reported 9 months ago.)

Well, the official way of  uninstall Java 7 and roll back to v6 from Oracle and Apple didn’t work for me. $ java -version still reported v1.7.

Thanks to Topher Kessler, this way worked for me;

delete the file 1.7.0.jdk located in /Library/Java/JavaVirtualMachines

Delete the v1.7.0.jdk file to uninstall Java 7
Delete the v1.7.0.jdk file