Just found this while looking for a way to show changes within a line rather than on separate +/- lines. “git diff –word-diff” does the trick! Thanks to A few git tips you didn’t know about by Mislav Marohnić.
For an extra-clean diff, the final command I used was:
git diff --word-diff --ignore-space-at-eol --patience -b -w --ignore-blank-lines <file1> <file2>
My git installation (version 2.8.3 on cygwin) defaults to a color diff, which makes it extra-easy to read.
Edit: to use this on local files rather than files in your git repo, you can add the “–no-index” option:
git diff --word-diff --ignore-space-at-eol --patience -b -w --ignore-blank-lines --no-index <file1> <file2>
I added an alias called “fsdiff” for this and now can say “git fsdiff <file1> <file2>” for a very nice diff!