Using xxdiff With Git On A Mac
Xxdiff is a great visual diff tool. You can set it up so that whenever you type
git xxdiff in a git branch, you will see all the changes you made since the last commit.
These instructions are meant for setting up xxdiff on a Mac.
First download xxdiff here.
Copy the above into your Mac's Applications directory.
.xxdiffrc file in your home directory with the visual settings you would like the xxdiff display to look like. The options can be found in the xxdiff documentation. The contents of my xxdiffrc file are:
Show.LineNumbers : true
Now that you have xxdiff setup and looking the way you want it, you must integrate it with Git. To do so you will need to have Git installed. Edit your local
.gitconfig file, which is generally found in your home directory.
Add the following to your
tool = xxdiff
prompt = false
cmd = /Applications/xxdiff.app/Contents/MacOS/xxdiff \"$LOCAL\" \"$REMOTE\"
xxdiff = difftool --dir-diff
Once this is done you should be able to run the
git xxdiff command from any git directory and xxdiff will open and show a diff between the previous commit and the changes you have made.