命令: git rm -r --cached . // 清除缓存 重新读取 git add . git commit -m 'commit信息' 这三条命令跑完以后 .gitignore 再去提交的话就会起作用了