How to remove node_modules in git

Last updated on April 26th, 2019 at 08:16 pm

You may accidentally add the node_modules or you forgot to add the node_modules directory to .gitignore list, no worry, you may remove it after you pushed to the git.

First, add the node_modules in to the .gitignore

vim .gitignore

After added the /node_modules and save it.

git rm -r --cached .
git add .
git commit -m "remove gitignore files"
git push origin master

Tags:

Discover more from Juzhax Technology

Subscribe now to keep reading and get access to the full archive.

Continue reading