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. asp.net刷新本页面的六种方法总结

    第一: private void Button1_Click( object sender, System.EventArgs e )   {     Response.Redirect( Reque ...

  2. 20170527关于Thingking in Java

    由于工作上的需求,要开始学习Android开发,所以先开始看一些Java方面的知识.学习从Thingking in Java开始,看了一下第一张,感觉真的是一本好书,希望自己努力把他看完,加油! 第一 ...

  3. python 关于时区

    pytz提供了时区对象timezone 如果我们如此使用: tz = pytz.timezone('Asia/Shanghai') datetime.datetime(nYear, nMonth, n ...

  4. 洛谷P1979 华容道(70分 暴力)

    P1979 华容道 题目描述 [问题描述] 小 B 最近迷上了华容道,可是他总是要花很长的时间才能完成一次.于是,他想到用编程来完成华容道:给定一种局面, 华容道是否根本就无法完成,如果能完成, 最少 ...

  5. Docker存储卷

    六.Docker 存储卷(volume) COW:写时复制 Bind mount volume:手动mount绑定的卷 # docker run --name centos-3 -it -v /dat ...

  6. 洛谷P4116 Qtree3

    题目描述 给出\(N\)个点的一棵树(\(N-1\)条边),节点有白有黑,初始全为白 有两种操作: \(0\) \(i\) : 改变某点的颜色(原来是黑的变白,原来是白的变黑) \(1\) \(v\) ...

  7. 20165224 陆艺杰 Exp 8 Web基础

    .基础问题回答 (1)什么是表单 html的一个控件 表单在网页中主要负责数据采集功能 (2)浏览器可以解析运行什么语言 html xml jsp php python 等 (3)WebServer支 ...

  8. 一个经典的PHP文件上传类

    需求分析如下: (1)支持单个文件上传 (2)支持多个文件上传 (3)可以指定保存位置 可以设置上传文件允许的大小和类型 可以选择重命名和保留原名 <!-- 设计一个经典文件上传类 需求分析 ( ...

  9. Base64Utils

    package com.yundaex.common.crypto.base64; import java.io.ByteArrayInputStream; import java.io.ByteAr ...

  10. 读书笔记 - 《梦想与浮沉:A股十年上市博弈》

    拿到这本书是个很偶然的事件.有几本软件业书由于太老已经绝版,偶然想到小区的图书馆自动借阅机和读者证的预借功能,就兴冲冲的跑去尝试.没想到预借只能在网页上进行,就随手从机器里借了这本书.没想到细观之下让 ...