-
-
Save qmachard/2f88a9787dc0b16d07093a280a9a4a21 to your computer and use it in GitHub Desktop.
Use PHPStorm/WebStorm for git diff and merge tools
This file contains hidden or 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
| # ~/.gitconfig | |
| # Add this to your global git configuration file | |
| # Change phpstorm to webstorm, if you use that. | |
| # Diff and merge tool changes | |
| # Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
| [merge] | |
| tool = phpstorm | |
| [diff] | |
| tool = phpstorm | |
| [difftool] | |
| ; This setting is optional, but prevents an annoying prompt between diffing files. | |
| prompt = false | |
| [difftool "phpstorm"] | |
| cmd = /Applications/PHPStorm.app/Contents/MacOS/phpstorm diff $(cd $(dirname \"$LOCAL\") && pwd)/$(basename \"$LOCAL\") $(cd $(dirname \"$REMOTE\") && pwd)/$(basename \"$REMOTE\") | |
| path = | |
| [mergetool "phpstorm"] | |
| cmd = /Applications/PHPStorm.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 | |
| [alias] | |
| dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment