sen*_*hil 143 git line-endings git-config
使用Git,当使用该autocrlf = true标志时,在更改行结尾时仍会发出警告.
我理解警告的内容,以及如何关闭行结束标志,但是如何关闭警告本身呢?
Chr*_*ial 256
您可以使用关闭警告
git config --global core.safecrlf false
Run Code Online (Sandbox Code Playgroud)
(这只会关闭警告,而不是功能本身.)
您应该使用core.autocrlf input和core.eol input。或者只是不让git完全用改变行尾,而用autocrlf false摆脱diffs中crlfs的突出显示,等等core.whitespace cr-at-eol。
希望这可以帮助
您正在寻找该core.whitespace选项(请参阅参考资料 了解git config --help详细信息)。
您可以像这样设置此选项:
$ git config core.whitespace cr-at-eol
Run Code Online (Sandbox Code Playgroud)