Using the default configuration in Windows, the git client defaults to core.autocrlf=true which will cause all LF line endings to become CRLF... adding that unwanted, pesky CR.
That's a problem if the user then uses something like SCP/SFTP to transfer the files over to a Linux machine or a Docker environment to run the code as the CR portion will stick around and cause shell scripts and other parsers to complain about syntax errors and the like, leading to non-running code. No good.
Preventing this automatic conversion away from LF would resolve this issue, but it must not cause CRLF to be left as line endings in committed files.
Using the default configuration in Windows, the git client defaults to
core.autocrlf=true
which will cause allLF
line endings to becomeCRLF
... adding that unwanted, peskyCR
.That's a problem if the user then uses something like SCP/SFTP to transfer the files over to a Linux machine or a Docker environment to run the code as the
CR
portion will stick around and cause shell scripts and other parsers to complain about syntax errors and the like, leading to non-running code. No good.Preventing this automatic conversion away from
LF
would resolve this issue, but it must not causeCRLF
to be left as line endings in committed files.