Our favorite (and free) visual diff and merge tool for OS X (as well as Linux and Windows) is DiffMerge. It makes resolving nasty Git branch conflicts a snap (relatively speaking). Here’s how to install it and configure it with Git on OS X:
Download the DiffMerge OS X installer. Be sure to download the Installer version. There’s also a DMG version but then you’ll have to manually install the diffmerge command line script.
Once you’ve downloaded it go into terminal and make sure you can run it from the command line by typing diffmerge and hitting return.
To configure Git to use DiffMerge run these commands from the command line:
git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd 'diffmerge "$LOCAL" "$REMOTE"'
git config --global merge.tool diffmerge
git config --global mergetool.diffmerge.cmd 'diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"'
git config --global mergetool.diffmerge.trustExitCode true
Now, whenever you want it to launch diffs just use difftool where you’d normally use diff:
# diff the local file.m against the checked-in versionfile.m
# diff the local file.m against the version in some-feature-branch
some-feature-branch file.m
# diff the file.m from the Build-54 tag to the Build-55 tag
Build-
54..Build-
55file.m
To resolve merge conflicts, just run git mergetool:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4