Other answers are complete enough, but in providing ways of showing somehow invisible differences explicitly. However, there's another option: ignoring these differences, which are somehow unimportant. In some cases, it's not useful to be informed about these differences.
diff command has some useful options regarding this:
strip trailing carriage return on input
ignore changes where lines are all blank
ignore white space at line end
Personally, I found
--strip-trailing-cr useful, especially when using
--recursive) option on large projects, or when Git's
core.autocrlf is not
false (i.e. is either
For more information on these options and more, see its man page (or via
Note: Using these options affects the performance of getting results, especially in the case of huge files/directories. In one of my own cases, it increased the manipulation time from
sed -n l filename. If it won't help, add a data example and
filecommand will hint you about file content, including things like
ASCII text, with CRLF line terminatorsvs
stat) on both files and compare the sizes (and include that information in any question). That’s a minimal, obvious first step toward diagnosing the situation.