git .gitignore 文件不起作用 .gitignore 不起作用的原因是因为 git 有以前文件缓存,只要清理一次缓存即可 git rm -r --cached . // 然后再进行 git git add . git commit