core.autocrlf=input
is the right setting for what you want, but you might have to do a git update-index --refresh
and/or a git reset --hard
for the change to take effect.
With core.autocrlf
set to input
, git will not apply newline-conversion on check-out (so if you have LF in the repo, you'll get LF), but it will make sure that in case you mess up and introduce some CRLFs in the working copy somehow, they won't make their way into the repo.