1

I set up Git today to work with GitHub. I want to use tkdiff as my default diff tool. I remember I used it before and it was nice and easy.

I downloaded the zip file from their website and see a tkdif file in the zip. However, I am not sure how to install it. Where do I place the file?

Additionally, what is the correct way to set tkdiff as the default diff/merge tool?

Thank you!

trustory
  • 163
  • 1
  • 8

1 Answers1

1
  1. Add the folder which contains tkdiff.exe to your %PATH% (where you have uncompressed tkdiff 4.3.5).
  2. Configure the tool in Git:

    git config --global diff.tool tkdiff
    git config --global difftool.tkdiff.cmd "\"C:\\Path\\to\\tkdiff.exe\" -s \"\$LOCAL\" -d \"\$REMOTE\""
    

Note that tkdiff wiki does not mention any recent Windows support (using TclTk)

So you might want to consider instead kdiff3, as commented, which does actually has a kdiff3.exe.

See "Git: How configure KDiff3 as merge tool and diff tool"

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I used KDiff3 per your link and it worked. the only thing I had to add was $ git config --global diff.tool kdiff3 Also, is there a way to default to KDiff3 when typing 'git diff'? – trustory Jun 08 '20 at 19:11
  • 1
    @trustory Not with `git diff` directly, but just typing `git difftool` will launch the tool you have previously configured (https://stackoverflow.com/a/26732990/6309) – VonC Jun 08 '20 at 19:18