git提交LF will be replaced by CRLF 错误

当我使用hexo d -g时出现错误,

1
2
warning: LF will be replaced by CRLF in tags/index.html.
The file will have its original line endings in your working directory.

接下来四步即可:

git config core.autocrlf true

git config –global core.autocrlf true

git config –global core.autocrlf input

git config –global core.autocrlf false