1. 首先在根目录下的.gitignore文件中写入node_modules,确保下次提交排除node_module文件夹
2. 然后将node_modules从git 追踪中删除,命令如下
git rm -r --cached node_modules
3.重新提交
git add .
git commit -m'remove node_modules文件夹'
git push
不小心把node_modules文件夹提交到远程仓库
最新推荐文章于 2024-07-06 11:26:39 发布