intellij as diff and mergetool
open -Wna "IntelliJ IDEA.app" --args "[email protected]"
open
.git/config
(or your global gitconfig
file)[merge]
tool = intellij
[mergetool "intellij"]
cmd = 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 = idea diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE")
- foo.LOCAL: the "ours" side of the conflict - ie, your branch (HEAD) that will contain the results of the merge
- foo.REMOTE: the "theirs" side of the conflict - the branch you are merging into HEAD
- foo.BASE: the common ancestor. useful for feeding into a three-way merge tool
- foo.BACKUP: the contents of file before invoking the merge tool, will be kept on the filesystem if mergetool.keepBackup = true.
idea merge <path1> <path2> [<base>] <output>
Last modified 1yr ago