Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Helper script for p4merge and Git on MacOSX

View p4merge
1 2 3 4 5
#!/bin/bash
 
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done;
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}"
 
View p4merge
  • 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.

Thanks @henrik242! I would never have figured this out on my own.

I wrote wrapper scripts for Windows, Mac and Linux to iron out the integration of p4merge with git: http://pempek.net/articles/2014/04/18/git-p4merge/

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.