git diff output is not easy to read when the text file contains long lines that is long enough to exceeds the screen size.
We may not forbid the using the long lines for all files.
How to handle lone lines in
git diff better?
Two possible methods to make
git diff with long lines easier to read:
Method 1: Git can highlight changes in lines instead of showing two lines of each version:
git diff --word-diff
It will prints changes in format like:
Method 2: Make git wrap long lines:
PAGER='' git diff --word-diff