主警告:LF 将在 git 推送时被 CRLF 消息替换
master warning: LF will be replaced by CRLF messages on git push
每次我从 windows 机器推送到 github 时,我都会看到这些消息:
C:\G\ab>git commit -m "Added new breadcrumb code"
[master warning: LF will be replaced by CRLF in WebUserApp/content/less/body.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/html-light.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/top.css.
谁能告诉我是什么原因造成的,我该如何解决(如果需要解决)这个问题。
您可以将 git 配置中的 autocrlf
选项设置为 false 或 input。
您可以在全局部分编辑 .git/config
文件时设置该选项,或者使用 git 命令行
git config --global core.autocrlf false
https://help.github.com/articles/dealing-with-line-endings/
Why should I use core.autocrlf=true in Git?
每次我从 windows 机器推送到 github 时,我都会看到这些消息:
C:\G\ab>git commit -m "Added new breadcrumb code"
[master warning: LF will be replaced by CRLF in WebUserApp/content/less/body.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/html-light.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in WebUserApp/content/less/top.css.
谁能告诉我是什么原因造成的,我该如何解决(如果需要解决)这个问题。
您可以将 git 配置中的 autocrlf
选项设置为 false 或 input。
您可以在全局部分编辑 .git/config
文件时设置该选项,或者使用 git 命令行
git config --global core.autocrlf false
https://help.github.com/articles/dealing-with-line-endings/
Why should I use core.autocrlf=true in Git?