version control - What's the best visual merge tool for Git? - Stack Overflow
To just diff, do kdiff3 file1 file2a or kdiff3 file1 file2a file2b (this assumes that file1 is a common ancestor to file2a and file2b), and to do a three way merge with those files and outputting the merged file to file3 do kdiff3 -b file1 file2a file2b -...