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,相当于把路径的 / 符号进行转义,这样添加的时候就有问题

 

posted @ 2017-11-26 00:25  一粒小米-博客  阅读(484)  评论(0编辑  收藏  举报