敲完代码后,如果修改了package.json文件,在终端用git进行同步时,git add . 后会报如下错误:
warning:LF will be replaced by CRLF in package.json. The file will have its original line endings in your working directory
查询发现,windows中的换行符是 CRLF,而在Linux下的换行符是LF,所以在执行git add . 时,会出现warning。
运行如下命令后即可正常使用:
git config core.autocrlf false //禁用自动转换
标签:LF,git,package,json,warning,CRLF From: https://www.cnblogs.com/ruanyingao/p/16874395.html