visual-studio-codediff

How to change the diff tool used by VSCode for git?


I would like to use the difftastic diff tool, which ignores whitespace changes in code (amongst other useful functionalities), and I have set my .gitconfig to use difft (the binary file of difftastic) as my preferred external diff tool using this command:

git config --global diff.external difft

And, my .gitconfig has these lines in it:

[diff]
    external = difft

However, the VSCode text editor still shows whitespace diffs. I have searched for a way to change the diff tool in VSCode to no avail, the only results are "How to set VSCode as the default merge/diff tool for git".

To clarify, I would like to change the diff tool used by the vscode text editor section as well as the diff viewer. I do not want to change the tool used by the commandline git command itself. In the image I've linked, it shows changes for whitespace, which should not be happening if difft is set as the diff tool.


Solution