I have already committed a lot of files to my current repository (I haven't pushed them yet). However, many of these files that a lot of space and I shouldn't include them. I have updated my .gitignore accordingly to remove them, however my question is how to prevent these files from being pushed to the repository now?
I have tried git rm -r folder and it has actually deleted my entire folder on this. I just want to delete these files from the current commit. How can I do this?