错误如下:在执行add后出现如下错误
Mac-mini:vuex tang$ git add . warning: LF will be replaced by CRLF in README.md. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in .babelrc. The file will have its original line endings in your working directory.
原因:
Linux平台下的换行符是 LF,而Windows下则是 CRLF,所以当你在 Windows 保存文件时候,换行符会被保存为 CRLF
解决方法:
Git 命令行输入如下命令,禁止自动转换换行符。
git config --global core.autocrlf false
yeah!