Trying to commit Git files but getting :: fatal: LF would be replaced by CRLF in

后端 未结 6 1506
粉色の甜心
粉色の甜心 2020-11-30 22:15

When I try to commit some changed files, I get the following error message with TortoiseGit

fatal: LF would be replaced by CRLF in

6条回答
  •  猫巷女王i
    2020-11-30 23:03

    git config --global core.autocrlf false will checkin files with CRLF, that is not used to.

    I've noticed on Windows, that with core.autocrlf true git doesn't like files with LF and core.autocrlf input doesn't like CRLF.

    So: commit CRLF files with core.autocrlf true and LF files with core.autocrlf input (or convert them to CRLF).

    Usually files with LF is autogenerated by code generators (e.g. https://start.spring.io or http://yeoman.io/)

提交回复
热议问题