Git使用出现warning: LF will be replaced by CRLF 的完美解决办法

Huang Rong@DESKTOP-O2VRRQO MINGW64 ~/Documents/git/testgit (master)
$ git add test.txt
warning: LF will be replaced by CRLF in test.txt.
The file will have its original line endings in your working directory

出现warning: LF will be replaced by CRLF是换行符的原因,解决办法很简单,一行代码,如下配置:

$ git config --global core.autocrlf false

我们再来add一条操作试试

Huang Rong@DESKTOP-O2VRRQO MINGW64 ~/Documents/git/testgit (master)
$ touch demo.txt

Huang Rong@DESKTOP-O2VRRQO MINGW64 ~/Documents/git/testgit (master)
$ git add demo.txt


完美~

你可能感兴趣的:(错误记录,Git)