修改.gitignore 文件规则后不生效是因为 git 有本地文件状态的缓存
.gitignore
git
要先进行暂存区清空,在重新添加文件即可生效。
git rm -r --cached . git add .