git删除远程仓库中的文件夹

具体操作如下:

git rm -r --cached .history    #删除目录

git commit -m”删除.history文件夹”

git push

-r表示递归所有子目录,如果你要删除,是空文件,此处可以不用带上-r。

在.ignore文件中添加不想提交的文件夹,如下:

 【完】

原文地址:https://www.cnblogs.com/tangjiao/p/10330131.html