[FAQ] Windows 终端 `git diff` 出现 LF 空格 ^M 符号, 处理方式

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

可能是终端内的换行配置和 IDE 当中的不一致。

比如 PHPStorm 的:

 

Git 终端使用 git config core.autocrlf 查看是 true 还是 false。

是 true 则会把换行(比如: LF)自动转换为 CRLF。

如果是 false,可以进行如下设置:

$ git config --global core.autocrlf true

 

Ref:WindowsGit客户端技巧

Link:https://www.cnblogs.com/farwish/p/16542572.html

posted on 2022-08-03 08:38  ercom  阅读(238)  评论(0编辑  收藏  举报