Git diff and merge tool with Intellij Idea
Windows
1
2
3
4
5
6
7
8
9
[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
1
2
3
4
5
6
7
8
9
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")