git push之后删除远程仓库node_modules和dist

  1. 在**.gitignore**文件上写上:
    node_modules/
    dist/

  2. 进入仓库目录,删除github仓库上.gitignore上新加的选项
    git rm -r --cached .

  3. 然后重新添加要提交的选项
    git add .
    git commit -m 'remove node_modules and dist

  4. 最后在git push 到远程仓库上就可以了。
    git push

猜你喜欢

转载自blog.csdn.net/Follow_the_heart/article/details/84105652