The file will have its original line endings in your working directory.

本文介绍了解决在使用Git提交过程中遇到的The file will have its original line endings in your working directory错误的方法,包括如何通过git rm、git add和git push等命令进行修复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误描述

在使用git提交的时候出现The file will have its original line endings in your working directory.错误,后来发现 自己再提交的时候忘记输入git add 上传的文件 出现了上面的错误,需要下面进行修改:

1 git rm -r -f --cached ./   (删除缓存)

2 git add . (添加该目录下所有文件)

3 git push -u origin master  (这时候提交就没问题了)
初次提交的命令
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:xxxx.git
git push -u origin master
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值