Setup p4merge as a visual tool with GIT

Setup p4merge as a visual mergetool

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

Setup p4merge as a visual diff tool

$ git config –global diff.tool p4merge
$ git config –global difftool.p4merge.cmd \
“/Applications/p4merge.app/Contents/Resources/launchp4merge \$LOCAL \$REMOTE”

Using p4merge to resolve conflicts

When you run into a conflict when merging simply run:

$ git merge