Sometimes the files you’re trying to ignore had already been submitted into version control on previous occasions. To ignore those existing files, you’ll need to re-submit them as deleted files. After which they would be removed from the repository. It looks like .gitignore isn’t working, but it actually is.