三个步骤
- 首先在根目录下的
.gitignore
文件中写入node_modules
,确保下次提交排除node_module
文件夹 - 然后将
node_modules
从git 追踪中删除,命令如下
git rm -r --cached node_modules
- 重新提交
git add .
git commit -m'remove node_modules文件夹'
git push
.gitignore
文件中写入node_modules
,确保下次提交排除node_module
文件夹node_modules
从git 追踪中删除,命令如下git rm -r --cached node_modules
git add .
git commit -m'remove node_modules文件夹'
git push