GIT: remove folders that have already been commited and pushed
I have many a time added node_modules and the likes to my git repositories.
Tired of always googling it, I noted down this solution to cleaning up after.
make .gitignore file (or update the one you have)
add node_modules/ or what you want to get rid of line to the .gitignore file
Run the following lines:
git rm -r --cached .
git add .
git commit -m "remove gitignore files"
git push