How can I use `git diff --color-words` outside a Git repository?

Vi. picture Vi. · Apr 12, 2011 · Viewed 18.7k times · Source

How can I get output like in git diff --color-words, but outside Git?

Closest thing is wdiff -t, but it underlines/inverts things instead of using green/red colours and does not allow specifying my whitespace regex.

Answer

Vi. picture Vi. · Apr 12, 2011

git diff --color-words --no-index