Sometimes .gitignore will not take effect, because if a file has been tracked by git, it will continue to be tracked, as long as the git cache is cleared, the command is as follows:
git rm -r --cached .
git add .
git commit -m 'clean cache'
Sometimes .gitignore will not take effect, because if a file has been tracked by git, it will continue to be tracked, as long as the git cache is cleared, the command is as follows:
git rm -r --cached .
git add .
git commit -m 'clean cache'