Featured image of post 解决 The file will have its original line endings in your working directory

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

解决一些问题

欢迎关注我的微信公众号【万能的小江江】

‘The file will have its original line endings in your working directory’问题

问题再现

​ 把git仓库复制到某个地方,或者clone下来的git仓库在上传时有时候会出现下面这种问题

解决方法

​ 分别执行以下三行代码

1.清除缓存
1
git rm -r --cached

image-20210422203335314

2.禁用换行
1
git config core.autocrlf false
3.把所有文件添加到git暂存区中
1
git add .