idea提交代码时.gitignore过滤不生效问题
git rm -r --cached . git add . git commit -m 'update .gitignore'
如果遇到报错
error: the following file has staged content different from both the file and the HEAD: .idea/caches/build_file_checksums.ser (use -f to force removal)
那么再加个-f就完事了:
举例:强制删除.idea文件夹下面的所有文件
git rm -r -f --cached .idea/