Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With Git, how do I turn off the "LF will be replaced by CRLF" warning

With Git, when using the autocrlf = true flag, a warning is still given when line-endings are changed.

I understand what the warning is for, and how to turn off the line-ending flag, but how do I turn off the warning itself?

like image 782
sent-hil Avatar asked Jun 28 '11 02:06

sent-hil


People also ask

How do I stop git from replacing LF with CRLF?

You can set the mode to use by adding an additional parameter of true or false to the above command line. If core. autocrlf is set to true, that means that any time you add a file to the Git repository that Git thinks is a text file, it will turn all CRLF line endings to just LF before it stores it in the commit.

What is warning LF will be replaced by CRLF in git?

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 an LF.

Does git use CRLF or LF?

This is a good default option. text eol=crlf Git will always convert line endings to CRLF on checkout. You should use this for files that must keep CRLF endings, even on OSX or Linux. text eol=lf Git will always convert line endings to LF on checkout.

What is CRLF git?

LF. original (usually LF , or CRLF if you're viewing a file you created on Windows) Both of these options enable automatic line ending normalization for text files, with one minor difference: core. autocrlf=true converts files to CRLF on checkout from the repo to the working tree, while core.


1 Answers

You can turn off the warning with

git config --global core.safecrlf false 

(This will only turn off the warning, not the function itself.)

like image 58
Chronial Avatar answered Sep 22 '22 05:09

Chronial