[git] LF will be replaced by CRLF in git - What is that and is it important?

When I create a new rails application I'm seeing a warning in git about LF replacement. I do git init git add .

and then boom! I see this pop up for almost all files. I usually just keep going and build my application and it disappears after many changes to files.

Example:

The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in Gemfile.

The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in Gemfile.lock.

The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in README.

What's the difference between LF and CRLF?

Should I be concerned about this in the long run or just ignore it and keep going as I usually do?

This question is related to git

The answer is


If you want, you can deactivate this feature in your git core config using

git config core.autocrlf false

But it would be better to just get rid of the warnings using

git config core.autocrlf true