Are there any risks or disadvantages of using: git config --global core.autocrlf false

I am using Windows and the PHPStorm IDE for web development. In Git Bash, when I want to add ( git add .) or commit- there will be hundreds of warnings like this:

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

But if I do the following in Git Bash:

git config --global core.autocrlf false

No more warnings. Is there a risk or lack of installation core.autocrlf- false? Or should I not worry? As I already wrote, I work with web applications (php files, html files, css ... that will later be redirected to a remote registry on GitHub or copied to a production Linux server ...). Sorry for my bad english.

+4
source share
1 answer

In short, this should not matter.

On Windows, the standard line-ending format is a carriage return followed by a line ( CRLFfor short), while in the Unix world only a line ( LFfor short) is used. This is what your warning is about git- that it wants to change the type lines ending in the file that it commits, even if it does not change in your local working directory.

Unix CRLF, Windows Unix ( ). git Unix-, . , , , , Windows Unix.

, - ( - ), , . , , , , , , /, .

+3

Source: https://habr.com/ru/post/1648063/


All Articles