VS Code is just an interface to Git. Close VS Code, it's just getting in the way right now. git
is its own thing and it's good to know how to use it.
Open a command line and git commit
your changes.
This doesn't actually delete the files. git rm
keeps the files in Git history; that's what version control does. You could delete your whole repository. The .git
directory in your project directory contains the entire repository. Delete that and you've deleted your repository.
However, I suspect you actually want to keep the repo and just remove the files. To do this you need to remove it not just from your current commit, but also from all of your commit history. Follow the instructions on Github for removing sensitive data from your repository or use the BFG Repo-Cleaner.