Intellij as git diff and mergetool
2020-10-19 ::
( 1 minutes reading )
Setup idea script
First, you need to set up idea
script by following the instruction here
If you are using mac, make sure you add -W
on the open script as follows (see this issue)
open -Wna "IntelliJ IDEA.app" --args "$@"
setup git difftool & mergetool
Taken from https://gist.github.com/rambabusaravanan/1d1902e599c9c680319678b0f7650898#gistcomment-2132894
open .git/config
(or your global gitconfig
file)
|
|
Explanation about LOCAL, REMOTE, BASE from stackoverflow
- 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
syntax
idea merge <path1> <path2> [<base>] <output>
comments powered by Disqus