git add . 的时候遇到warning: LF will be replaced by CRLF inXXX 解决办法

Posted 一粒小米

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git add . 的时候遇到warning: LF will be replaced by CRLF inXXX 解决办法相关的知识,希望对你有一定的参考价值。

$ git add .
warning: LF will be replaced by CRLF in shop/Runtime/Cache/86bbc820c9ec1 d314a9c71cf5651d98a.file.showlist.html.php. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in shop/Runtime/Cache/b62273c43ffc6 23554cccb888c7b4cd5.file.tianjia.html.php. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in shop/Runtime/Cache/cd1a830b5cc3a 2d001883e22cb7c27dc.file.showlist.html.php. The file will have its original line endings in your working directory.

解决方法:

git config --global core.autocrlf false

原因:

路径中存在 / 的符号转义问题,false就是不转换符号默认是true,相当于把路径的 / 符号进行转义,这样添加的时候就有问题

 

以上是关于git add . 的时候遇到warning: LF will be replaced by CRLF inXXX 解决办法的主要内容,如果未能解决你的问题,请参考以下文章

Windows环境git执行git add命令warning: ....

输 入 git add . 后出现 warning: LF will be replaced by CRLF in ......

git warning: LF will be replaced by CRLF in 解决办法

git warning: LF will be replaced by CRLF in 解决办法

git warning: LF will be replaced by CRLF in 解决办法

git 使用 git add , 报错 warning: LF will be replaced by CRLF in .idea/dataSources/eea70815-99be-4ae6-a95