有时候,.gitignore会对部分文件/文件夹失效,大概原因是由于新创建的文件已经出现在git本地仓库的缓存,所以.gitignore就失效了

解决办法就是清空一下git仓库的缓存,重新提交一次就好了

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

 

相关文章:

  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2021-05-09
  • 2021-10-17
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-11-03
  • 2022-02-18
  • 2022-12-23
  • 2022-02-20
相关资源
相似解决方案