解决git报错“The file will have its original line endings in your working directory”的方法
在执行命令 git commit --all -m '说明' 时报错“The file will have its original line endings in your working directory”
通过查询后发现出现这个问题主要原因是:
我们从别人github地址上通过git clone下载下来,而又想git push到我们自己的github上,那么就会出现上面提示的错误信息
此时只需要执行如下代码:
git rm -r --cached .
git config core.autocrlf false
git add .
注意 这里是有 "." 的, ". " 代表当前目录
参考链接:https://blog.csdn.net/liereli/article/details/80824804
希望对你有帮助!
解决git报错“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 add . 的时候发现此报错 报错分析 看情况应该是不同系统对换行的识别不到位导致的 就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的 ...
- [Git add . ] 遇到The file will have its original line endings in your working directory 解决办法
1.在新项目中使用[ git add . ]时出现: warning: LF will be replaced by CRLF in ...... The file will have its ori ...
- windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.
window10下使用git时 报错如下: $ git add readme.txtwarning: LF will be replaced by CRLF in readme.txt.The fil ...
- Git提交时提示‘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出现错误 git add -A ...
- git出现“The file will have its original line endings in your working directory”错误
一.现象: git add *时出现如下现象: The file will have its original line endings in your working directory 解决: G ...
- The file will have its original line endings in your working directory.
在空仓库的情况下,add,出现一下问题 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 -r --cached . git config core.autocrlf false git add . . 代表当前目录
- 解决 The file will have its original line endings in your working directory
首先出现这个问题主要原因是:我们从别人github地址上通过git clone下载下来,而又想git push到我们自己的github上,那么就会出现上面提示的错误信息 此时需要执行如下代码: git ...
- warning: LF will be replaced by CRLF in ***. The file will have its original line endings in your working directory.
git config --global core.autocrlf false
随机推荐
- JavaScript之数据类型转换
JavaScript中有多种数据类型,在实际工作中,不管是有意还是无意的,我们总能碰到不一样的数据类型值之间进行运算,或者我想从用户输入获得一个数字时,而用户却输入了一个字符串,这种时候就需要用到今天 ...
- Python必备收藏!Pycharm 常用快捷键思维导图!
本内容首发公众号[计算机视觉联盟],关注获取更多资料! 考虑到可能图片压缩,将思维导图的pdf和jpg版本都上传了百度云,大家可以下载打印一张A4纸,方便查询! 公众号后台回复关键词: 2019082 ...
- Android Studio [Activity的生命周期]
package com.xdw.a122; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; imp ...
- mybatis 插件的原理-责任链和动态代理的体现
目录 1 拦截哪些方法 2 如何代理 3 代理对象 4 责任链设计模式 @ 如果没有自定义过拦截器, 可以看我前面的文章.如果不知道 JDK 动态代理怎么使用的, 可以看我这文章. 责任链设计模式理解 ...
- F#周报2019年第39期
新闻 宣告F# 4.7 宣告.NET Core 3.0 .NET Core 3.0中ASP.NET Core与Blazor的更新 .NET Conf 2019里提到的ML.NET与模型构建器 参与.N ...
- windows下配置多个tomcat步骤
步骤如下: 1.使用压缩版的tomcat不能使用安装版的.2.第一个tomcat的配置不变.3.增加环境变量CATALINA_HOME2,值为新的tomcat的地址:增加环境变量CATALINA_BA ...
- 说说 Java 线程间通信
序言 正文 一.Java线程间如何通信? 线程间通信的目标是使线程间能够互相发送信号,包括如下几种方式: 1.通过共享对象通信 线程间发送信号的一个简单方式是在共享对象的变量里设置信号值:线程A在一个 ...
- Java 学习笔记之 Synchronized锁重入
Synchronized锁重入: 当一个线程得到一个对象锁后,再次请求此对象锁时是可以再次得到该对象的锁.这也证明在一个Synchronized方法/块的内部调用本类的其他Synchronized方法 ...
- Linux下格式化恢复USB启动优盘
问题描述:优盘制作成启动盘安装操作系统,但是后边使用时发现无法格式化,提示 This partition cannot be modified because it contains a partit ...
- Java自动化测试框架-01 - TestNG之入门篇 - 大佬的鸡肋,菜鸟的盛宴(详细教程)
TestNG是什么? TestNG按照官方的定义: TestNG是一个测试框架,其灵感来自JUnit和NUnit,但引入了一些新的功能,使其功能更强大,使用更方便. TestNG是一个开源自动化测试框 ...