git 更新 .gitignore 后,配置不生效问题

关于 清除git 缓存
一、总结
git rm --cached "文件路径",不删除物理文件,仅将该文件从缓存中删除;
git rm --f "文件路径",不仅将该文件从缓存中删除,还会将物理文件删除(不会回收到垃圾桶)

二、使用  

清除git缓存 ,并更新 .gitignore 文件

git rm -r --cached .
git add .
git commit -m 'update .gitignore'

  

 

posted @ 2022-06-23 09:25  。啊月  阅读(108)  评论(0编辑  收藏  举报