Remove node_modules from git in vscode

后端 未结 7 1435
误落风尘
误落风尘 2021-01-29 19:37

Getting error while removing node_modules in git, vscode terminal

 git rm -r --cached node_modules

Error:

7条回答
  •  孤独总比滥情好
    2021-01-29 20:01

    Create .gitignore file and add node_modules there:

    touch .gitignore && echo "node_modules" >> .gitignore
    

    Remove cached data:

    git rm -r --cached .
    

    Update your last commit:

    git add .
    
    git commit --amend --no-edit
    
    git push --force-with-lease
    

提交回复
热议问题