just a logo :)

search:



imprint







Compare Long Lines
Entry Nr. 3306, by user 1
It's pretty hard to compare super long lines in the terminal. This command works fine:

git diff --word-diff=color --word-diff-regex=. file1 file2

One thing this solution does not visualize is added or deleted white space.

So an even better solution is to use the background color to show the difference:

git -c color.diff.old='normal red' -c color.diff.new='normal green' diff --word-diff=color --word-diff-regex=. file1 file2

The more verbose output without =color also works:

git diff --word-diff --word-diff-regex=. file1 file2

If the lines are not too long, vimdiff also works:

vimdiff file1 file2