Skip to content

Instantly share code, notes, and snippets.

@alexbaumgertner
Forked from jvandyke/.gitconfig
Last active December 29, 2015 13:09
Show Gist options
  • Save alexbaumgertner/7675698 to your computer and use it in GitHub Desktop.
Save alexbaumgertner/7675698 to your computer and use it in GitHub Desktop.
# ~/.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 = webstorm
[diff]
tool = webstorm
[difftool]
prompt = false
[difftool "webstorm"]
cmd = webide diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE")
trustExitCode = true
[mergetool "webstorm"]
cmd = webide 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
# Add this to your .profile, .zshrc, .bashrc, etc.
# Add webStorm's bin directory to end of yours path.
:/Applications/WebStorm.app/Contents/MacOS/
# My variant:
export PATH=./node_modules/.bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/WebStorm.app/Contents/MacOS/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment