git ignore file .gitignore invalid
Problem Description
When the project was created early, all folders were tracked with git. However, with subsequent business changes, I found that there are two folders, which are useless. I hope that the git tracking of these two files can be ignored.
After modifying the .gitignore configuration file, it still does not take effect.
solution
Due to the caching mechanism of git.
# 1. 修改.gitignore配置文件
# 2.清除缓存
git rm -r --cached .
# 3.重新提交
git add .
git commit -m 'update .gitignore'