26 de junio de 2018

Configure DiffMerge on Windows

These are commands to set DiffMerge for Windows as default difftool / mergetool

To configure as diff tool

git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd "C:/Program\ Files/SourceGear/Common/DiffMerge/sgdm.exe \"$LOCAL\" \"$REMOTE\""
view raw config-diff.sh hosted with ❤ by GitHub

To configure as merge tool

git config --global merge.tool diffmerge
git config --global mergetool.diffmerge.trustExitCode true
git config --global mergetool.diffmerge.cmd "C:/Program\ Files/SourceGear/Common/DiffMerge/sgdm.exe -merge -result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\""
view raw configmerge.sh hosted with ❤ by GitHub

If you want to get more information, you can check SourceGear DiffMerge.

To check all configuration, you can type git config --global -e and your git file should looks like this: