Skip to content

Instantly share code, notes, and snippets.

@ppanyukov
Created June 20, 2011 10:22
Show Gist options
  • Save ppanyukov/1035407 to your computer and use it in GitHub Desktop.
Save ppanyukov/1035407 to your computer and use it in GitHub Desktop.
Using p4merge with Git Mac OS X or Ubuntu

Git config

$ git config --global -e
[merge]
    keepBackup = false;
    tool = p4merge
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
    keepTemporaries = false
    trustExitCode = false
    keepBackup = false

p4merge Wrapper in search path

#!/usr/bin/env 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