Your .gitignore
is absolutely correct, but .gitignore
will only stop files from being added to the repository – already tracked files are not concerned by this. So, first you need to remove all the error_log
files from the index by running:
git rm --cached '*/error_log' error_log
Now when you run git status
some of your error_log files should be listed as “deleted”, but none of them should appear as untracked files.