Skip to content

Instantly share code, notes, and snippets.

@williscool
Forked from henrik242/p4merge
Created August 24, 2012 20:18
Show Gist options
  • Save williscool/3455204 to your computer and use it in GitHub Desktop.
Save williscool/3455204 to your computer and use it in GitHub Desktop.
Helper script for p4merge and Git on MacOSX
$ chmod 755 /usr/local/bin/p4merge
$ git config --global merge.tool p4merge
$ git config --global diff.guitool p4merge
$ git config --global mergetool.prompt false
$ git config --global mergetool.p4merge.path /usr/local/bin/p4merge
  • git mergetool and git difftool --gui 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