Getting error while removing node_modules
in git, vscode terminal
git rm -r --cached node_modules
Error:
You can remove folders from git without the command-line using vs-code.
If you want to remove node_modules
from git:
node_modules
to node_modulesx
node_modulesx
to .gitignore (create a .gitignore file if you need to)The above 3 steps will remove the node_modules
folder from git.
node_modulesx
back to node_modules
node_modules
to .gitignore (or change node_modulesx
to node_modules
in your .gitignore)Now your node_modules
folder still exists, but will not be committed to git anymore.