Adding files to .gitignore means that git won't track these files. But if you added projects to repository already, you need to *forget* that files first, by git rm --cached filename.filextension should do the work. Marked files will be removed from repository on next commit, but they will remain in your local directory.
Not sure how these cli commands transpiles to VS extension, thought.