在vscode中从git中删除node_modules [英] Remove node_modules from git in vscode

查看:615
本文介绍了在vscode中从git中删除node_modules的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在git,vscode终端中删除node_modules时出现错误

Getting error while removing node_modules in git, vscode terminal

 git rm -r --cached node_modules

错误:

严重错误: pathspec'node_modules'与任何文件都不匹配

推荐答案

  1. 制作.gitignore文件.
  2. 将node_modules/行添加到gitignore文件
  3. 运行此命令 git rm -r --cached . git add . git commit -m "remove gitignore files" git push
  1. make .gitignore file.
  2. add node_modules/ line to gitignore file
  3. run this command git rm -r --cached . git add . git commit -m "remove gitignore files" git push

这篇关于在vscode中从git中删除node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆