在执行命令 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”的方法的更多相关文章

  1. git 提交报错 : The file will have its original line endings in your working directory.

    报错现象 git  add . 的时候发现此报错 报错分析 看情况应该是不同系统对换行的识别不到位导致的 就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的 ...

  2. [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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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. 当报这个警告时是 ...

  7. 解决使用git出现 The file will have its original line endings in your working directory

    执行以下命令即可解决 git rm -r --cached . git config core.autocrlf false git add . . 代表当前目录

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

    首先出现这个问题主要原因是:我们从别人github地址上通过git clone下载下来,而又想git push到我们自己的github上,那么就会出现上面提示的错误信息 此时需要执行如下代码: git ...

  9. 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

随机推荐

  1. [C++] C++中的常用库

    转载自:C++常用库 C++ 资源大全 关于 C++ 框架.库和资源的一些汇总列表,内容包括:标准库.Web应用框架.人工智能.数据库.图片处理.机器学习.日志.代码分析等. 标准库 C++标准库,包 ...

  2. JQuery对于动态生成的标签绑定事件失效

    JQuery对整个html文档进行dom操作后,我们要想动态绑定事件,有两种方法 1.在进行dom操作时,在标签中写上onclick="afun()" 2.利用document的操 ...

  3. mybatis 插件的原理-责任链和动态代理的体现

    目录 1 拦截哪些方法 2 如何代理 3 代理对象 4 责任链设计模式 @ 如果没有自定义过拦截器, 可以看我前面的文章.如果不知道 JDK 动态代理怎么使用的, 可以看我这文章. 责任链设计模式理解 ...

  4. CDH集群的配置优化须知

           通过改善IFile阅读器的性能 IFile Reader,进而可改善随机处理程序并减少储备空间,达到MapReduce的配置最佳实践要求.而MapReduce shuffle的处理程序和 ...

  5. maven war包打包去除jar包瘦身

    1.pom文件配置 <!-- war包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

  6. echarts使用——柱状图

    开发中,做报表统计的时候,很容易用到echarts实现折线图.饼状图.柱状图的绘制,使用echarts插件很简单,官网有教程实例,但主要是这些图需要的数据格式的转换. 我的柱状图实现效果: 第一部分 ...

  7. github- 优秀资源总结

    权限控制篇: SpringMVC-Mybatis-Shiro-redis-0.2-master:https://www.sojson.com/shiro / https://m.imooc.com/a ...

  8. Git tag相关命令

    常见命令如下: // 查看标签,可加上参数-l(列表形式列出) -n(附加说明) git tag [-l -n] // 查看符合检索条件的标签 git tag -l .*.* // 查看对应标签状态 ...

  9. Java 基础篇之反射

    反射 使用反射获取程序运行时的对象和类的真实信息. 获取 Class 对象 每个类被加载之后,系统会为该类生成一个对应的 Class 对象,通过该 Class 对象可以访问到 JVM 中的这个类. 使 ...

  10. yii中缓存(cache)详解 - 彼岸あ年華ツ

    缓存是用于提升网站性能的一种即简单又有效的途径.通过存储相对静态的数据至缓存以备所需,我们可以省去生成 这些数据的时间.在 Yii 中使用缓存主要包括配置和访问缓存组件 . 内部方法 一.缓存配置: ...