gitignore不起作用的解决办法

780 阅读1分钟
git rm -r --cached .
git add .
git commit -m 'update .gitignore'   //mac使用命令 

通过rm清楚相关缓存,再次提交就可以生效了