首页 > 其他分享 >idea提交代码时.gitignore过滤不生效问题

idea提交代码时.gitignore过滤不生效问题

时间:2022-11-15 00:44:34浏览次数:45  
标签:git -- idea 过滤 file rm 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/

标签:git,--,idea,过滤,file,rm,gitignore
From: https://www.cnblogs.com/smile008/p/16891085.html

相关文章