LF will be replaced by CRLF

I was getting following message while trying to add files to GIT index:

Warning: LF will be replaced by CRLF ….

By google search I found that – whenever tried to add files to the repository, git thinks that, the file is a text file and all files automatically will have their LF line endings converted to CRLF endings.

It’s an important warning for a binary file because git incorrectly assesses a binary file to be a text file but it’s OK for text file.

The line-ending conversion can be prevent by setting false of core.autocrlf attribute. By default it remains true.

The command is as follows(in Bash mode):

git config core.autocrlf false

Leave a Comment