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 git getdiff is available just as git diff
# diff the local file.m against the checked-in version git difftool file.m # diff the local file.m against the version in some-feature-branch git difftool some-feature-branch file.m # diff the file.m from the Build-54 tag to the Build-55 tag git difftool Build-54..Build-55 file.m
To merge conflicts, run
git mergetool
credit due Todd Huss