我可以禁止 "LF will be replaced by CRLF" 的消息吗?

Can I suppress the messages that "LF will be replaced by CRLF"?

我可以在 Git Bash 的控制台(git commit 命令的输出)中抑制此类消息吗?

warning: LF will be replaced by CRLF in 1.txt.
The file will have its original line endings in your working directory.

--quiet 选项不执行此操作。

禁用 safecrlf 配置:

git config core.safecrlf false

core.safecrlf

If true, makes Git check if converting CRLF is reversible when end-of-line conversion is active. Git will verify if a command modifies a file in the work tree either directly or indirectly. For example, committing a file followed by checking out the same file should yield the original file in the work tree. If this is not the case for the current setting of core.autocrlf, Git will reject the file. The variable can be set to "warn", in which case Git will only warn about an irreversible conversion but continue the operation.