.gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。那么解决方法就是先把本地缓存删除(改变成未track状态),然后再提交:

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

 

相关文章:

  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2018-03-31
猜你喜欢
  • 2022-02-20
  • 2021-09-29
  • 2022-01-26
  • 2021-06-01
  • 2022-12-23
  • 2022-02-18
  • 2021-05-26
相关资源
相似解决方案