The easiest way is to install it with
homebrew this is and was pretty cool package manager for MacOs. But you can find
kdiff3 in homebrew so you will want to install caskroom as well. And then kdiff3.
All can be done just in two lines of code:
brew tap caskroom/cask
brew cask install kdiff3
And now have it in your Applications. Next step is to configure your git cli by modifying ~/.gitconfig:
[difftool "kdiff3"]
path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
trustExitCode = false
[difftool]
prompt = false
[diff]
tool = kdiff3
[mergetool "kdiff3"]
path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
trustExitCode = false
[mergetool]
keepBackup = false
[merge]
tool = kdiff3
After that you are ready to use you kdiff3 as difftool in git command line:
$>git difftool branchName