虽然我执行了LF will be replaced by CRLF in git - What is that and is it important?
git config core.autocrlf true
我还是
警告:LF将被替换为CRLF ... /。vscode / taskmarks.json
如何真正解决这个问题?
答案 0 :(得分:1)
请参阅“ git replacing LF with CRLF”:
警告“
LF will be replaced by CRLF
”表示您(拥有autocrlf=true
)将在提交检出周期后丢失您的Unix风格的LF (它将由Windows-样式CRLF)。
Git不希望您在Windows下使用Unix风格的LF 。
(发出警告)
确保没有* text=auto
之类的.gitattributes指令。
您可以将core.safecrlf
设置为false,但不能在Git 2.17 / 2.18中设置:请参见“ Trying to commit Git files but getting: fatal: LF would be replaced by CRLF
in <some file in repo>
”:为此,您需要Git 2.19。