Git Warning: LF will be replaced by CRLF

james picture james · Jul 15, 2014 · Viewed 22.3k times · Source

I am using Git gui. I see this error for several files in a folder. I have two choice buttons - Unlock index and Continue. I don't understand what the buttons do. I saw other SO posts which tell me to ignore the warning, but they don't mention how to do it in GUI. Please tell me which button I should press and why. Thanks.

Here is the error message sample -

Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui.

warning: LF will be replaced by CRLF in gen/com/click4tab/pustakalpha/BuildConfig.java. The file will have its original line endings in your working directory. (repeat above messages for other files)

Answer

CodeWizard picture CodeWizard · Jul 16, 2014

Set up the CRLF and the problem will "disappear"

git config --global core.autocrlf false

https://help.github.com/articles/dealing-with-line-endings