CRLF will be replaced by LF in XXX when git commit
今天,普通平凡的一天,平凡的使用 git add .,然后又出现一个之前没遇到的错误提示 。 真开心,手下败将又可以多一个了。
以下是错误提示:
warning: CRLF will be replaced by LF in XXX . The file will have its original line endings in your working directory.
照例先奉上解决方法
解决方法,非常简单,就一个命令行就可以解决的问题。
git config core.autocrlf false //将设置中自动转换功能关闭
问题解释和分析
warning: CRLF will be replaced by LF in XXX . The file will have its original line endings in your working directory.
我看到这个错误,有一种,每个单词都认识,就是看不懂这个提示到底是啥意思的感觉。(学好英语真的很重要~)
CRLF : windows 环境下的换行符
LF : linux 环境下的换行符
这个错误的意思,就是文件中存在两种环境的换行符,git 会自动替换 CRLF 为 LF ,所以提示警告。
至于为什么会出现这种情况的发生,因为公司的电脑是 mac,所以我怀疑是粘贴复制导致存在两种类型的换行符。
CRLF will be replaced by LF in XXX when git commit的更多相关文章
- [git] warning: LF will be replaced by CRLF | fatal: CRLF would be replaced by LF[ git 处理和修改行结束符(CRLF和LF)]
我自己的设置是: [core] autocrlf = false[core] safecrlf = true 取消自动转换CRLF(上图中选的是commit as is),但是有提交前混用检查 本人用 ...
- [git] warning: LF will be replaced by CRLF | fatal: CRLF would be replaced by LF
遇到这两个错误,是因为Git的换行符检查功能. core.safecrlf Git提供了一个换行符检查功能(core.safecrlf),可以在提交时检查文件是否混用了不同风格的换行符.这个功能的选项 ...
- git warning: CRLF will be replaced by LF in resources/views/sessions/create.blade.php
git config core.autocrlf false
- git@github.com: Permission denied (publickey).////remote: Permission to xxx/test.git denied to xxx.等权限问题
Error msg git@github.com: Permission denied (publickey) 或者: remote: Permission to xxx/test.git denie ...
- AS 新电脑clone项目报错:Clone failed: Authentication failed for 'https://gitee.com/XXX/Demo.git/'
在新的电脑上安装Android Studio,并且使用git clone 项目,报以下错误: Clone failed: Authentication failed for 'https://gite ...
- git error: unable to write file xxx,git fatal: unable to write new index file
执行git checkout -- . error: unable to write file mobile/manifest.jsonfatal: unable to write new index ...
- git pull出现fatal: unable to access 'https://github.com/XXX/YYY.git'
用cmd 发现ping不同 github.com Ping不通,这时候,只需要在host文件里做些修改就可以,首先,定位到路径 C:\Windows\System32\drivers\etc 找到ho ...
- 【异常】org.eclipse.jgit.api.errors.TransportException: git@xxx.xxx.xxx/base-config-center.git: channel is not opened.
一.异常原因 连不上git仓库,可能原因有: 1.)git仓库不存在 2)连接git仓库超时 二.对应的解决办法 1) 创建对应仓库 2) 2.1 换个服务性能更好的部署gitlab 2.2 可以研究 ...
- 如何在命令行添加换行符到git commit -m "xxx"
需求来源: 需要将自动识别的组件信息.更新信息.任务跟踪单号.下载链接等信息自动提交并推送至gerrit, 然后作为触发条件启动另一个协作业务流程. 方法1:单引号开放方法 git commit -m ...
随机推荐
- Excel 使用VBA或宏----简单笔记
一.一种纯粹的录制宏.(未使用此方法,如有兴趣可自学),就是Excel提供了“所见即所得”的方式生成宏.把自己想要的操作记录,录制成宏. 自学网等各种网站有教学视频或文章 二.常用VBA语法及函数笔记 ...
- 02篇ELK日志系统——升级版集群之kibana和logstash的搭建整合
[ 前言:01篇LK日志系统已经把es集群搭建好了,接下来02篇搭建kibana和logstash,并整合完成整个ELK日志系统的初步搭建. ] 1.安装kibana 3台服务器: 192.168.2 ...
- MYSQL入门操作和常规DML、DDL、DQL使用
刷新权限,将某些权限从硬盘刷新到内存中(修改root密码自带隐式刷新权限操作) mysql> flush privileges; Query OK, 0 rows affected (0.00 ...
- Redis_数据类型
Redis支持的键值数据类型如下: 字符串类型 散列类型 列表类型 集合类型 有序集合类型 一.字符串类型 字符串类型是Redis中最基本的数据类型,它能存储任何形式的字符串,包括二进制数据.一个字 ...
- kernel: nfsd: too many open TCP sockets, consider increasing the number of threads
在/var/log/syslog中看到如下报错: kernel: nfsd: too many open TCP sockets, consider increasing the number o ...
- Nginx+Mysql调优
使用nginx实现反向代理作用,具备负载均衡的功能. 接受客户端的请求 | nginx(宿主机) | |-------------------| web1 web2 (客户机) 原理: 与 ...
- [PAT] 目录
题号 PAT Basic PAT Advaced PAT Top 1001 害死人不偿命的(3n+1)猜想 1002 写出这个数 1003 我要通过! 1004 成绩排名 ...
- qr.h
创建二维码 QRCodeCreate vc++
- 201871010101-陈来弟《面向对象程序设计(java)》第四周学习总结
...
- 14-C#笔记-字符串
1. 基本操作 using System; namespace StringApplication { class Program { static void Main(string[] args) ...