Skip to content

Instantly share code, notes, and snippets.

@hube
Last active May 27, 2016 00:12
Show Gist options
  • Save hube/9ebd9b23a93021cb77199d97858d972c to your computer and use it in GitHub Desktop.
Save hube/9ebd9b23a93021cb77199d97858d972c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Configure git to use diffmerge as the difftool and mergetool
git config --global difftool.prompt false
git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd "/usr/local/bin/diffmerge --nosplash \"\$LOCAL\" \"\$REMOTE\""
git config --global merge.tool diffmerge
git config --global mergetool.diffmerge.trustExitCode true
git config --global mergetool.diffmerge.cmd "/usr/local/bin/diffmerge --nosplash --merge --result=\"\$MERGED\" \"\$LOCAL\" \"\$BASE\" \"\$REMOTE\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment