index
but not locally.git rm -r --cached folder_name git commit -m "Removed folder from repository" git push origin master echo "/folder_name" >> .gitignore
.gitignore
to prevent further upload/commitgit rm -r --cached --ignore-unmatch
Without --ignore-unmatch
, git will exit with error on the first file not in the index.
Node_module
Uploaded to Remote RepoAdd /node_modules
to the .gitignore
file
/node_modules
Remove reference with this command (remember to commit everything before doing this)
git rm -rf --cached .
Delete /node_modules
from local project.
Commit this command which will delete the /node_modules
from both remote and local
git add .