.gitignore清缓存

如果已经添加了.gitignore,例如:

/build
.idea/
build/
.gradle/
app/app.iml
app/build.gradle
gradle/wrapper/gradle-wrapper.properties
local.properties

仍然可以在git status中看到修改,则需要清一下缓存:

git rm -r --cached
git add .
git commit -m "update .gitignore"
原文地址:https://www.cnblogs.com/not2/p/13433043.html