windows使用git时出现:warning: LF will be replaced by CRLF
原创
2017-12-02
java

问题:
newtranx_011@DESKTOP-TL2NRBP MINGW32 /e/test-study-git (master)
$ git add readme.txt
warning: LF will be replaced by CRLF in readme.txt.
The file will have its original line endings in your working directory.

原因:
windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示,

解决方法:

$ rm -rf .git  //删除仓库信息
$ git config --global core.autocrlf false  //修改全局配置 禁止自动换行
$ git init   //再次创建
$ git add .  //添加全部文件,这次就不会有 warning 了   

参考资料:
http://blog.csdn.net/unityoxb/article/details/20768687