"I already commited my Node.js project, but I forgot to add node_modules
to a gitignore. How fucked am I??"
It's cool, don't panic. First make your gitignore file:
$ touch .gitignore
Open it in Sublime Atom and add the line:
node_modules
Now to delete the folder from your existing git log, back in Terminal:
$ git rm -r --cached ./node_modules
Next time you do git add/commit, the node_modules folder is gone from git, but is still on your Mac.
Boom. You win.