Created
April 24, 2014 20:28
-
-
Save scoutman57/11268447 to your computer and use it in GitHub Desktop.
Use PHPStorm as your git diff tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
[merge] | |
tool = phpstorm | |
[diff] | |
tool = phpstorm | |
[difftool] | |
prompt = false | |
[difftool "phpstorm"] | |
cmd = /Applications/PhpStorm\\ EAP.app/Contents/MacOS/phpstorm diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") | |
trustExitCode = true | |
[mergetool "phpstorm"] | |
cmd = /Applications/PhpStorm\\ EAP.app/Contents/MacOS/phpstorm merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = true |
See https://gist.github.com/jvandyke/4355099#comment-1437345 for a simpler version you can use on new versions of PHPStorm and WebStorm.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your global .gitconfig file.