git config core.autocrlf is true, but I'm still getting a warning?

こ雲淡風輕ζ 提交于 2019-11-29 08:55:46

that it's good practice to let Git change line endings to LF before committing and back to CRLF when checking out.

It is, but not with core.autocrlf.
You should always set core.autocrlf to false, as it would try and convert eol (end of line) for all files (including non-text file)

If you have files that need conversion, use an eol directive in a .gitattributes file.
Make sure to use the latest Git for Windows though: there was a bug in Git 2.10.

That being said, if you still want to use core.autocrlf, see "Make Git “LF will be replaced by CRLF” warnings go away": you can remove your index and checkout again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!