git 提交报错 : The file will have its original line endings in your working directory.
报错现象
git add . 的时候发现此报错

报错分析
看情况应该是不同系统对换行的识别不到位导致的
就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的
报错解决
git config --global core.autocrlf false


同理在 pycharm 中也要做相关操作

在pycharm 中进行操作的时候也会提示这个问题. 如果选择 fix and commit 就会设置为 True 会被转换
所以我们要选择 commit as ls 不做处理
额外补充
Git下处理“换行”(line ending)
core.autocrlf是git中负责处理line ending的变量,可以设置3个值:true,false,inout。
(1)设置为true【config --global core.autocrlf true】
当设置成true时,这意味着你在任何时候添加(add)文件到git仓库时,git都会视为它是一个文本文件(text file)。
它将把crlf变成LF。
(2)设置为false【config --global core.autocrlf false】
当设置成false时,line endings将不做转换操作。文本文件保持原来的样子。
(3)设置为input时,添加文件git仓库时,git把crlf编程lf。当有人Check代码时还是lf方式。因此在window操作系统下,不要使用这个设置。
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提交时提示'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 commit --all -m '说明' 时报错“The file will have its original line endings in your working dir ...
- 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 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 ...
- 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 . . 代表当前目录
- 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
- 解决 The file will have its original line endings in your working directory
首先出现这个问题主要原因是:我们从别人github地址上通过git clone下载下来,而又想git push到我们自己的github上,那么就会出现上面提示的错误信息 此时需要执行如下代码: git ...
随机推荐
- shell脚本--eval执行shell命令
和其他语言的eval功能差不多,都是将一个保存执行语句的变量作为参数,eval会让变量所保存的语句执行. 下面是一个执行表单提交的命令:注意,这里只是示例,应用中不要这么使用,很危险 #!/bin/b ...
- CMD管道命令使用
Windows netstat 查看端口.进程占用 开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务 ...
- python3 常见的两种文件上传方法
1.上传页面带input type格式send_keys传值方式上传不能大于60k(具体看开发设置的value)文件大小 fx.find_element_by_id('xx').send_keys(r ...
- 【翻译】asp.net core中使用FluentValidation来进行模型验证
asp.net core中使用FluentValidation FluentValidation 可以集成到asp.net core中.一旦启用,MVC会在通过模型绑定将参数传入控制器的方法上时使用F ...
- [GS]uuid-ossp
uuid-ossp 原贴地址:http://postgres.cn/docs/9.6/uuid-ossp.html 关于 OSSP的含义 uuid-ossp模块提供函数使用几种标准算法之一产生通用唯一 ...
- [转帖]oracle改版sql server问题点汇总
https://www.cnblogs.com/zhangdk/p/oracle_sqlserver.html 只记得 最开始的时候看过 没有具体的了解里面的特点 原作者总结的很好 留下来 以后说不定 ...
- spring mvc常用注解总结
1.@RequestMapping@RequestMappingRequestMapping是一个用来处理请求地址映射的注解(将请求映射到对应的控制器方法中),可用于类或方法上.用于类上,表示类中的所 ...
- AngularJS双向数据绑定
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- CLOUD添加自定义基础数据
1.打开bos平台,文件-新建-复制-基础资料 2.新建目标对象 3.发布 4.开始新增对象 5.明细维护,完成 6.添加成功
- 谈谈B-树和B+树及其应用
待更!!! B-树和B+树的应用:数据搜索和数据库索引 B+/-Tree原理及mysql的索引分析 从B树.B+树.B*树谈到R 树 B树.B-树.B+树.B*树