Git提交时提示‘The file will have its original line endings in your working directory’
条评论折腾Hexo博客有一阵子,每次提交的时候直接Hexo d
后没管,这次仔细看了提交时的输出日志,发现满屏提示
warning: LF will be replaced by CRLF in xxxxx
The file will have its original line endings in your working directory.
之前一直没在意,趁有空着手解决,原来是Git默认配置替换回车换行成统一的CRLF
,我们只需要修改配置禁用该功能即可。
Gitshell中输入如下命令解决:
1 | git config --global core.autocrlf false |
使用git config --list
命令查看Git所有配置。
参考链接:
Git学习笔记
本文标题:Git提交时提示‘The file will have its original line endings in your working directory’
文章作者:凹凸曼
发布时间:2017-05-31
最后更新:2024-09-28
原始链接:https://sobaigu.com/The-file-will-have-its-original-line-endings-in-your-working-directory.html
版权声明:转载请务必保留本文链接和注明内容来源,并自负版权等法律责任。