首页 > 其他 > 详细

git 使用 git add , 报错 warning: LF will be replaced by CRLF in .idea/dataSources/eea70815-99be-4ae6-a952-eab6e67a770e.xml. The file will have its original line endings in your working directory

时间:2020-05-05 16:35:06      阅读:79      评论:0      收藏:0      [点我收藏+]

          git add:添加至暂存区,但并未提交至服务器。git add . 是表示把当前目录下的所有更新添加至暂存区。有时在终端操作这个会提示,只是个提示,可以不用管:

           技术分享图片

 

 

原因:
         这是因为文件中换行符的差别导致的。这个提示的意思是说:会把windows格式(CRLF(也就是回车换行))转换成Unix格式(LF),这些是转换文件格式的警告,不影响使用。

git默认支持LF。windows commit代码时git会把CRLF转LF,update代码时LF换CRLF。

解决方法:
注:  . 为文件路径名

git rm -r --cached .
git config core.autocrlf false
git add .
git commit -m ‘‘提交内容”
git push

git 使用 git add , 报错 warning: LF will be replaced by CRLF in .idea/dataSources/eea70815-99be-4ae6-a952-eab6e67a770e.xml. The file will have its original line endings in your working directory

原文:https://www.cnblogs.com/maxy11/p/12830515.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!