原点击打开链接 windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示,解决办法: [plain] view plain copy $ rm -rf .git // 删除.git $ git config --global core.autocrlf false //禁用自动转换 然后重新执行: [plain] view plain copy $ git init $ git add .