vim, git, aws and other three-letter words

Software Development Notes

git: kdiff3 as difftool and mergetool

To use kdiff3 as your diff tool and merge tool in git, run the following commands:

git config --global mergetool.kdiff3.cmd 'kdiff3 "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"'
git config --global merge.tool kdiff3
git config --global difftool.kdiff3.cmd 'kdiff3 "$LOCAL" "$REMOTE"'
git config --global diff.tool kdiff3

Alternatively, edit the ~/.gitconfig and add settings there:

[mergetool "kdiff3"]
    cmd = kdiff3 $LOCAL $REMOTE $BASE -o $MERGED
[diff "kdiff3"]
    cmd = kdiff3 $LOCAL $REMOTE
[merge]
    tool = kdiff3
[diff]
    tool = kdiff3

Tags: git