window10下使用git时 报错如下:

$ git add readme.txt
warning: LF will be replaced by CRLF in readme.txt.
The file will have its original line endings in your working directory.

意思大概是:LF(换行,Line Feed)将会被CRLF(回车换行,CarriageReturn)替代。

该文件将在工作目录中具有其原始行尾。

报这个警告时是由于文件夹远程不存在,但是不影响提交

解决办法:

$ rm -rf .git  // 删除.git
$ git config --global core.autocrlf false //禁用自动转换

然后重新执行:

$ git init
$ git add 文件名

windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.的更多相关文章

  1. [已解决]报错: warning: LF will be replaced by CRLF in lib/anime.min.js

    git config --global core.autocrlf false

  2. 错误 warning: LF will be replaced by CRLF in README.md.

    问题类型 windows中的换行符为 CRLF, 而在Linux下的换行符为LF,所以在执行add . 时出现提示:warning: LF will be replaced by CRLF in RE ...

  3. 解决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 dir ...

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

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

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

  7. git提交时”warning: LF will be replaced by CRLF“提示

    今天把项目做完之后,然后用Git准备提交代码的时候,遇到warning: LF will be replaced by CRLF警告. 当时在网上查了资料,发现很多的解决办法都是:修改git全局配置, ...

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

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

  9. Git warning:LF will be replaced by CRLF in readme.txt的原因与解决方案

    今天用Git bash遇到的问题,看了几个回答之后发现一个比较有价值的,给大家分享一下,其他很多的回答都有很或多或少存在一些弊端. 原回答地址在stackoverflow上,附上链接--http:// ...

随机推荐

  1. TMF大数据分析指南 Unleashing Business Value in Big Data(一)

    大数据分析指南 TMF Frameworx最佳实践 Unleashing Business Value in Big Data 前言 此文节选自TMF Big Data Analytics Guide ...

  2. MVC过滤大法(过滤静态文件)

    参考文章:https://prerakkaushik.wordpress.com/2014/02/12/routing-request-for-static-files-with-or-without ...

  3. 【leetcode 76. 最小覆盖子串】解题报告

    思路:滑动窗口思想 方法一:滑动窗口 string minWindow(string s, string t) { // 1.tdict记录T中每个字母与字母个数 // 2.维护一个滑动窗口字母的计数 ...

  4. Educational Codeforces Round 52E(构造,快速幂)

    #include <bits/stdc++.h>using namespace std;const int mod=998244353;long long b[200007];long l ...

  5. 多线程中wait、notify理解

    实在惭愧,java开发多年,多线程运用一直不多,该知识点理解也不够,不怎么会用.赶上使用多线程 生产者.消费者模式,学习下该知识点. synchronized  获取锁 wait 阻塞本线程,释放对象 ...

  6. 需要命名空间管理器或 XsltContext。此查询具有前缀、变量或用户定义的函数 及 多属性节点查询

    第一个问题, 1. 首先需要引入命名空间, 2. 其次,在用xpath查找结点时,在selectNodes等方法中再次带入命名空间 如 XmlDocument doc = new XmlDocumen ...

  7. 最长双回文串(模板+dp)

    题目链接 #include <bits/stdc++.h> using namespace std; typedef long long ll; inline ll read(){ , f ...

  8. string类型的方法

    var str1 = ' this is string1 '; var str2 = 'this is string2'; str1.indexOf('s'); //args:string retur ...

  9. linux命令ln

    创建软连接 ln -s 源文件   目标文件(指向源文件) ln -s /home/test/ /wang

  10. Django 04 模板标签(if、for、url、with、autoeacape、模板继承于引用、静态文件加载)

    Django 04 模板标签(if.for.url.with.autoeacape.模板继承于引用.静态文件加载) 一.if.for.url.with.autoescape urlpatterns = ...