If you edit a LaTeX document and keep you .tex files in a Git Repository, it is really hard to use git-diff useful, because in normal human readable text your document isn't structured in lines, but in sentences. Therefore it is useful to have a word-diff, where you can see which words have changed. This is especially useful if you ignore the 80-column rule.

[alias]
        wdiff = diff --color-words
        wshow = show --color-words
[core]
        pager = env LESS= less -XR

With this you get an git wdiff command, which performs a word-diff. The pager entry is needed for long lines, because git-diff sets the LESS environment variable to FRSX, which prohibits line breaks within the pager.

This is useful. As always with git configuration stuff, those lines have to go to the repository's local .git/config file or globally to $HOME/.gitconfig as stated in the introduction to Git aliases.
Comment by Anonymous Mon 09 Jul 2012 10:09:36 AM GMT