git 提交缓存区提交代码时报错 warning: LF will be replaced by CRLF in .gitignore. The file will have its original line endings in
$ git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
原因
原因是路径中存在 / 的符号转义问题,false就是不转换符号默认是true,相当于把路径的 / 符号进行转义,这样添加的时候就有问题(可能是我.gitignore文件设置node_modules时在他前面加了一个斜杠的原因)
解决方法
git config --global core.autocrlf false
转为不检测“/”或者删除.gitigore“/”即可