How to automatically use git diff --word-diff option for *.tex files but not others?
问题 Is there a way to use --word-diff for LaTeX files (*.tex) and keep the standard line difference for other file types? What I want to achieve is to use git diff command and let git show the word difference on *.tex files automatically without a need to write git diff --word-diff each time. At the same time I want git to show the standard line difference for other file types. Is that possible? 回答1: See the Generating diff text section of the gitattributes documentation. However, to