windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original l

Posted guohaoblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original l相关的知识,希望对你有一定的参考价值。

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 l的主要内容,如果未能解决你的问题,请参考以下文章

Windows下Git使用报错:warning:LF will be replaced by CRLF in

解决:git warning: LF will be replaced by CRLF in xxxx

git报错warning: Clone succeeded, but checkout failed

Windows下SSHLinux出现:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

git add *的时候遇到warning: LF will be replaced by CRLF in folder/ 举报本内容

git 使用 git add , 报错 warning: LF will be replaced by CRLF in .idea/dataSources/eea70815-99be-4ae6-a95