Git diff and merge tool with Intellij Idea

Windows

[merge]
    tool = intellij
[mergetool "intellij"]
    cmd = cmd.exe //c "\"c:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.2.4/bin/idea.bat\" merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
    trustExitCode = true

[diff]
    tool = intellij
[difftool "intellij"]
    cmd = cmd.exe //c "\"c:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.2.4/bin/idea.bat\" diff \"$LOCAL\" \"$REMOTE\""

Mac

merge]
    tool = intellij
[mergetool "intellij"]
    cmd = /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea 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
[diff]
    tool = intellij
[difftool "intellij"]
    cmd = /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE")
Advertisements
This entry was posted in Git, Programming and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s