Answered
When I push code to my git remote repository, how do I tell Git to complete ignore the node_modules
directory? And to not have its contents pushed to GitHub?
The node_modules
directory is way too big to store on GitHub!
Add a .gitignore
file to the root of your project directory:
touch .gitignore
And then add this line of code to the .gitignore
file:
/node_modules
That will tell Git to ignore that folder when pushing updates to the remote repository.
You can read more about the .gitignore file here.