Sometimes, your .gitignore suddenly stops working as in even though you have added files and folder in it, they are not actually being ignored by git and is still getting tracked.
it might happen due to you have added the .gitignore after you added these files(That are not being ignored) to the repo.
it happens because, the files are already added to the repo before it could be ignored as .gitignore was created after the actual files in the repo.