When windows uses git, the initial words appear: warning: LF will be replaced by CRLF
The newline in windows is CRLF, and the newline in linux is LF, so a prompt appears when executing add . The solution:
$ rm -rf .git // 删除.git
$ git config --global core.autocrlf false //禁用自动转换
Then re-execute:
$ git init
$ git add .
How does git see which files are under version control
git ls-files