Skip to content

Instantly share code, notes, and snippets.

@mrbfrank
Created January 10, 2014 19:05
Show Gist options
  • Save mrbfrank/8360480 to your computer and use it in GitHub Desktop.
Save mrbfrank/8360480 to your computer and use it in GitHub Desktop.
.gitconfig for P4merge with spaces in path
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = "'/Applications/- Code -/p4merge.app/Contents/Resources/launchp4merge'" "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
[difftool "p4merge"]
cmd = "'/Applications/- Code -/p4merge.app/Contents/Resources/launchp4merge'" "\"$REMOTE\"" "\"$LOCAL\""
@mrbfrank
Copy link
Author

  1. Install p4merge from perforce.com
  2. Put the following bits in your ~/.gitconfig, and then you can do $ git mergetool and $ git difftool to use p4merge
  3. Note that $ git diff will still just use the default inline diff viewer :) (tested with git version 1.8.2)

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