windows10下git報錯warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.
阿新 • • 發佈:2018-06-02
init config code 回車 git init col ngs 使用 warn
window10下使用git時 報錯如下:
$ git add readme.txt
warning: 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)替代。
該文件將在工作目錄中具有其原始行尾。
報這個警告時是由於文件夾遠程不存在,但是不影響提交
解決辦法:
$ rm -rf .git // 刪除.git $ git config --global core.autocrlf false //禁用自動轉換
然後重新執行:
$ git init
$ git add 文件名
windows10下git報錯warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.