git add报错 fatal: LF would be replaced by CRLF in ***

博客内容讲述了在使用Git时遇到的换行符问题,通过执行`git config --global core.autocrlf false`和`git config --global core.safecrlf false`两个命令,成功解决了Linux与Windows系统之间因换行符差异导致的文件同步问题。博主还提到当前面试中对个人技术博客的关注,并计划将自己的技术总结从有道云笔记逐步迁移。

找了好几个博客都是推荐的(下面这个命令)没解决了。

git config --global core.autocrlf false

又找了到第二个命令下面这个在执行一下才成功。

git config --global core.safecrlf false

具体原因应该是liunx上的换行符和window的不一样导致的。

++++++++++感人的分隔符+++++++++++++++

现在面试都问有没有博客了(太卷了),自己这几年总结的都在有道云笔记了。后期慢慢搬吧。

warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'AppScope/resources/base/media/layered_image.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'code-linter.json5', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/.gitignore', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/hvigorfile.ts', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/obfuscation-rules.txt', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/main/ets/pages/Login.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/main/resources/base/element/string.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/main/resources/base/media/layered_image.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/main/resources/base/profile/main_pages.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/mock/mock-config.json5', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/ohosTest/ets/test/Ability.test.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/ohosTest/ets/test/List.test.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/test/List.test.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'entry/src/test/LocalUnit.test.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'hvigorfile.ts', LF will be replaced by CRLF the next time Git touches it error: 'inventory-system/' does not have a commit checked out fatal: adding files failed
09-18
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值