I made the mistake of creating a gitignore file after I had already pushed an initial commit to my git repo.
My .gitignore is very simple, it only contains:
node_modules
I've tried the following:
git rm --cached -rf .
git add .
git commit 'Fix untracked files'
git push
I've also tried deleting my .git folder in my project directory and reinitializing the entire project.
Both times it still pushes my node_modules directory!
How do I fix this?