Line Terminators

Because of the classic issue of different line terminator character sequences between the Unix and Windows environments, please set your project-specific or global-specific core.autocrlf Git configuration setting. On Unix/Linux/Mac, please use value input. On Windows, use true. The input setting itself does not modify files except at commit time.

Example for Unix/Linux/Mac: git config --global core.autocrlf input

Example for Windows: git config --global core.autocrlf true

On Windows, you might also want the core.safecrlf flag set to true or warn. Since conversion only happens when working in Windows, this configuration setting is only relevant there.

core.safecrlf = true
When getting ready to run this operation of replacing CRLF with LF before writing to the object database, Git will make sure that it can actually successfully back out of the operation. It will verify that the reverse can happen (LF to CRLF) and if not the operation will be aborted.
core.safecrlf = warn
Same as above, but instead of aborting the operation, Git will just warn you that something bad might happen. Any other value, or no value, means no check is performed.

Example for Windows: git config --global core.safecrlf true