I’m developing across Windows and Linux machines. I realized that with a git config of core.autocrlf = true, some files had their CRLFs from Windows converted to LFs in Linux.
So on my Windows, in a text file I would see:
sometextCRLF
moreCRLF
hahahaCRLF
CRLF
moreCRLF
CRLF
While on Linux:
sometextLF
moreLF
hahahaLF
LF
moreLF
LF
Is there any way after I run
git config core.autocrlf true
to force push everything so that my CRLFs aren’t lost? (I can’t push anything now since I don’t have any changes.)
core.autocrlfhas no effect on push, only on checkout. If you want to change existing working copies, you need to checkout them. If you want to change files in the repository you need to change and commit them manually and then push the new commits as usual.