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

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

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

 

相关文章:

  • 2021-05-21
  • 2022-02-03
  • 2022-12-23
  • 2022-01-25
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-12-16
  • 2022-02-21
  • 2021-08-26
  • 2022-12-23
相关资源
相似解决方案