Using visual git tools can save time and help you efficiently review changes.
There are many tools but we prefer and recommend diffmerge. It's open-source and cross-platform.
Please download "installer" version, not "DMG" version.
- Download diffmerge for your platform.
- Run following commands on your machine to set
diffmergeas git's diff and merge tool.
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
After this instead of
git diff, you can use
To resolve merge conflicts, you can run
TODO: if there are multiple files modified,
git difftool can't open them all together.
git difftool -d opens two dir but
diffmerge doesn't show diff. Not sure it it's diffmerge issue or
git difftool issue.
- Main Source for this article - http://twobitlabs.com/2011/08/install-diffmerge-git-mac-os-x/
- Meld - an alternative to diffmerge. Not tested yet.
- More diff tools for Mac - http://www.git-tower.com/blog/diff-tools-mac/