I'm finding similar results when there is a mismatch between the autoCRLF
setting (e.g. in ~/.gitconfig
) and the storage of line breaks in a text file. I have .php
files that were downloaded on one (Windows) machine, zipped up and unzipped in an Apache folder, then I copied those to a cloned repo and it sometimes complains about every file as changed. The files stored on GitHub seem to have been stored with CRLF
(they are larger).
I have been unable to get GitHub Desktop to process my modified files. I have tried a full fresh clone with autoCRLF=true
, autoCRLF=input
, and autoCRLF=false
, and yet GitHub Desktop either reports the files as empty or every line changed, depending on the autoCRLF setting.
I believe it is entirely because they were stored on GitHub with the CRLFs in the files, and GitHub Desktop seems to assume that the autoCRLF
governs (only) the checked out files, and won't compare with CRLFs on GitHub, even with autoCRLF=false
. They are byte-for-byte identical files, but they are LF-only, and it's either complaining every line has changed, or that the file is empty.
If I do a git diff
on one of the files, in this case feed.php
, I see:
warning: CRLF will be replaced by LF in API/events/feed.php.
The file will have its original line endings in your working directory.