Your problem is that when you check out files on Windows with the git default config, they are created with CRLF
(the windows default) line endings in your working directory, but committed as LF
for cross-platform compatibility.
Now your Linux sees the CRLF
on every line and says that it’s different to the LF
in the repo. That’s why every line is reported as different.
I would suggest setting the line endings to LF
on windows. In a previous answer I explained the details of how to do that. Following those steps will also enable line-ending normalization to LF
on linux, which will avoid problems if you accidentally create some CRLF
on windows and commit that in linux later on.
You can also just disable line ending normalization completely, but that is likely to cause trouble in the future, unless you only use a completely fixed set of editors, whose line ending handling you know very will.