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

  

. 代表当前目录

---------------------
作者:badly1226
来源:CSDN
原文:https://blog.csdn.net/liereli/article/details/80824804
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/kaerxifa/p/10984432.html

时间: 2024-10-17 16:33:44

解决 The file will have its original line endings in your working directory的相关文章

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 file will have its original line endings in your working directory. 意思大概是:LF(换行,Line Feed)将会被CRLF(回车换行,CarriageReturn)替代. 该文件将在工作目录中具有其原始行尾. 报这个警告时是由于文件夹

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 解决: Gitshell中输入如下命令解决: git config --global core.autocrlf false 原文地址:https://www.cnblogs.com/igoodful/p/11470370.html

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

在空仓库的情况下,add,出现一下问题 当报这个警告时是由于文件夹远程不存在,但是不影响提交warning: LF will be replaced by CRLF in KashuoService/res/values-w820dp/dimens.xml. 换行方式不统一

[git] -- warning: LF will be replaced by CRLF in app/app.iml. The file will have its original line endings in your working directory.

遇到这个错误,因为是git的换行符检查功能.之前代码是在MAC下,后来放在windows系统下,git add .的时候报这个错误. core.safecrlf git 提供了一个换行符检查功能(core.safecrlf),可以在提交时检查文件是否混用了不同风格的换行符. false --- 不做任何检查: warn --- 在提交的时候检查并报告: true --- 在提交时检查,如果发现混用则拒绝提交: 建议使用最严格的true选项. core.autocrlf 如果用两台不同系统的电脑写

python升级带来的yum异常(解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:)

解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 错误: 原因: 这是因为yum采用python作为命令解释器,原来系统自带的python解释器为python2.7,然后我之前为了方便将python默认的解释器设为了python3.6,导致按python3.6解析2.7的语法出错了. 解决方法: 修改/usr/bin/yum文件中的第一行为#!/usr/bin/python2.7 可能你的系统不是2.7,通过ta

python出现SyntaxError: Non-ASCII character '\xe6' in file 打印日期.py on line 1, but no encoding declared;

刚开始学习python,照着书上敲的代码: #根据给定的年月日以数字的形式打印出来 months = [ 'January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ] #以1-31的数字作为结尾的列表 endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd',

inconsistent line endings 解决方法

?? I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system. When saving a cs file in Visual Studio and returning to Unity 3D I always get the following warning: There are inconsistent line endings in the 'someFileName.c

The line endings in the following file are not consistent.

Cause: This dialog box is not from SourceAnywhere Standalone. It is a Visual Studio warning. It occurs when the file you are loading contains a mix of Windows standard and non-standard line-endings. Resolution: You can ignore EndOfLine by disabling t

PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法

今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file in *.php on line *,然后我就根据提示,找到那个文件,然后错误中总是提示最后一行出错,我找到最后一行发现是</html>,晕的,这能有什么错误,找了好久才找到问题所在,拿来分享. 出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,我后来一条一条看才发现,原来是PHP语句标识符错了,正常情况下应该是这样的:<?php