Skip to content

Instantly share code, notes, and snippets.

@cweekly
Last active August 29, 2015 14:15
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 cweekly/5757ef8f1e2c52c631b0 to your computer and use it in GitHub Desktop.
Save cweekly/5757ef8f1e2c52c631b0 to your computer and use it in GitHub Desktop.
.gitconfig for p4merge (dirs w spaces)
[merge]
keepBackup = false
tool = p4merge
conflictstyle = diff3
[mergetool "p4merge"]
cmd = "'/Applications/p4merge.app/Contents/Resources/launchp4merge'" \
"\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepBackup = false
keepTemporaries = false
trustExitCode = false
[diff]
tool = p4merge
[difftool "p4merge"]
cmd = "'/Applications/p4merge.app/Contents/Resources/launchp4merge'" \
"\"$LOCAL\"" "\"$REMOTE\""
@cweekly
Copy link
Author

cweekly commented Feb 13, 2015

Thanks to https://gist.github.com/mrbfrank/8360480 for the proper combo of $PWD and escaped quotes.

@cweekly
Copy link
Author

cweekly commented Apr 20, 2015

(reversed LOCAL and REMOTE order for diffs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment