Monday, 16 February 2015

Remove Node Modules from Git repo

On the rare occasion that anyone accidentally pushes the ‘Node_Modules’ folder into their Git repository. This snippet of code will remove and push the ‘Node_Modules’ folder back to your repository.

git rm -r --cached node_modules
git commit -m 'Remove the node_modules folder'
git push origin master
Of course you would also add the .gitignore file to exclude the ‘Node_Modules’ folder at this point.


  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP