Skip to content

DiffMerge setup with git

thebluefactor edited this page Jul 9, 2013 · 2 revisions

(Original instructions from @jeresiv)

On Windows command line

git config --global diff.tool sgdm

git config --global difftool.sgdm.cmd 'sgdm "$LOCAL" "$REMOTE"'

git config --global merge.tool sgdm

git config --global mergetool.sgdm.cmd 'sgdm --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"'

git config --global mergetool.sgdm.trustExitCode true

On Mac command line

git config --global diff.tool sgdm

git config --global difftool.sgdm.cmd '/Applications/DiffMerge.app/Contents/MacOS/DiffMerge "$LOCAL" "$REMOTE"'

git config --global merge.tool sgdm

git config --global mergetool.sgdm.cmd '/Applications/DiffMerge.app/Contents/MacOS/DiffMerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"'

git config --global mergetool.sgdm.trustExitCode true

Clone this wiki locally