The meaning of this error is that there are two newline characters in the file, git will automatically replace CRLF with LF, so a warning is given.
warning: CRLF will be replaced by LF in [File] . The file will have its original line endings in your working directory.
$ git config --global core.autocrlf false
Refuse to submit a file containing a mixed line break
$ git config --global core.safecrlf true
$ git config --global core.safecrlf false
$ git config --global core.safecrlf warn
$ git config --global core.autocrlf true
$ git config --global core.autocrlf input
$ git rm --cached -r . && git reset --hard # Warning, your local changes will be lost, so commit FIRST
$ echo "* text=auto" >>.gitattributes
Convert Cloned Files with CRLF line endings to LF and to update the .gitattributes file to auto enforce the LF line endings.
find . -type f -exec dos2unix {} \;
The warning can be also triggered when the line ending do not match the one specified in the
.gitattributes
file with the option eol.