I'm having problems with git diff -word-diff. The fact is that diff receives a file without newline characters (one line file), it changes it line by line. And I want to share this word by word.
This is what happens when I compare files without newlines:
git diff -a
And if I add a new line to the end of the files, everything will work as expected:
git diff -a
source share