Sunday, December 7, 2014

LF will be replaced by CRLF warning on Git when committing to Repo


When I commit code to GitHub using my local repository I have these errors below:

warning: LF will be replaced by CRLF in app/assets/javascripts/application.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in app/models/something.rb.
The file will have its original line endings in your working directory.

"In Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have a LF. It's nothing to worry about."

http://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important

If you want, you can deactivate this in your git core config, just type this command.
"git config core.autocrlf true"