Remove node_modules from git in vscode

后端 未结 7 1452
误落风尘
误落风尘 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:11

    Make .gitignore file in your project directory.

    .gitignore file will look like this

    /Folder_name
    

    Type in below commands in the terminal or equivalent:

    git rm -r --cached Folder_name (remove the directory from git but not delete it from the filesystem/locally)
    
    git commit -m "remove unused directory"
    
    git push origin  (can be master or develop or others)
    

提交回复
热议问题