Using winmerge as a git diff tool

Welp – after a long break I’m back…  I’ve recently switched over to git as a code repository – so far it’s been pretty good.  Actually very similar to SVN or AccuRev.

My problem so far is with the diff — I don’t have the desire or patience to learn VI.  I’ve found that I can integrate winmerge into git.  The handy instructions are here:

https://coderwall.com/p/76wmzq/winmerge-as-git-difftool-on-windows

The steps are as follows:

1) Open .gitconfig file. It’s located at your home directory:
c:\users\username\.gitconfig

2) Add the lines below. Pay attention to the single quotes wrapping the path to winmerge:

[diff]
    tool = winmerge
[difftool "winmerge"]
    cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -e "$LOCAL" "$REMOTE"
Here’s an example of how to diff your local copy of web.config with the checked in version:
git difftool -y HEAD .\Web.config
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s