↓
CSZ.NET
  • post
  • proj
  • tag

git取消文件忽略

  • 原因
  • 解决

原因 #

.gitignore只能忽略原来没有被track的文件,如果某些文件在版本管理中被忽略过,后续再修改.gitignore文件是无效的。

解决 #

解决办法为把本地缓存删除,然后再提交

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

←→ GoAccess搭配宝塔使用 Github Action SSH部署 →←
↑