码迷,mamicode.com
首页 > Windows程序 > 详细

windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.

时间:2018-06-02 00:45:31      阅读:392      评论:0      收藏:0      [点我收藏+]

标签:core   文件名   换行   div   crlf   add   windows   directory   解决   

window10下使用git时 报错如下:

$ 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.

意思大概是:LF(换行,Line Feed)将会被CRLF(回车换行,CarriageReturn)替代。

                     该文件将在工作目录中具有其原始行尾。

                     报这个警告时是由于文件夹远程不存在,但是不影响提交

解决办法:

$ rm -rf .git  // 删除.git  
$ git config --global core.autocrlf false  //禁用自动转换    

然后重新执行:

$ git init    
$ git add 文件名

 

windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.

标签:core   文件名   换行   div   crlf   add   windows   directory   解决   

原文地址:https://www.cnblogs.com/guohaoblog/p/9123949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!