Skip to content

Instantly share code, notes, and snippets.

@galori
Forked from tony4d/p4merge4git.md
Last active August 29, 2015 14:23
Show Gist options
  • Save galori/4003b68fabb30716b1c2 to your computer and use it in GitHub Desktop.
Save galori/4003b68fabb30716b1c2 to your computer and use it in GitHub Desktop.

Download and install p4merge

Setup p4merge as a visual mergetool

$ git config --global merge.tool p4mergetool
$ git config --global mergetool.p4mergetool.cmd \
"/Applications/p4merge.app/Contents/Resources/launchp4merge \$PWD/\$BASE \$PWD/\$REMOTE \$PWD/\$LOCAL \$PWD/\$MERGED"
$ git config --global mergetool.p4mergetool.trustExitCode false
$ git config --global mergetool.keepBackup false

Setup p4merge as a visual diff tool

$ git config --global diff.tool p4mergetool
$ git config --global difftool.p4mergetool.cmd \
"/Applications/p4merge.app/Contents/Resources/launchp4merge \$LOCAL \$REMOTE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment