git add 报错The file will have its original line endings in your working directory

执行如下命令,添加代码到本地仓库

git add .

出现警告信息:The file will have its original line endings in your working directory

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

解决办法:

git config --global core.autocrlf false

posted @ 2023-06-01 17:00  aixueforever  阅读(62)  评论(0编辑  收藏  举报