Skip to content

Instantly share code, notes, and snippets.

@coolgo
Forked from henrik242/p4merge
Created October 16, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolgo/9578fb4537e10b19cd0b to your computer and use it in GitHub Desktop.
Save coolgo/9578fb4537e10b19cd0b to your computer and use it in GitHub Desktop.
Helper script for p4merge and Git on MacOSX
  • Copy p4merge to /usr/local/bin/p4merge
  • Download P4V.dmg and copy p4merge.app to /Applications
  • Configure Git:
$ chmod 755 /usr/local/bin/p4merge
$ git config --global merge.tool p4merge
$ git config --global mergetool.prompt false
$ git config --global mergetool.keepBackup false
$ git config --global mergetool.p4merge.path /usr/local/bin/p4merge
  • git mergetooland git difftool will launch p4merge now.
#!/bin/bash
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done;
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment