如何从 GIT 中删除文件夹?

How to delete folders from GIT?

我需要删除 BitBucket 中的 2 个文件夹:

我使用了命令: git rm folder1 folder2

出现错误:

Fatal: not removing "folder1" recursively without -r

git rm folder1 folder2 更改为 git rm -r folder1 folder2 以删除目录。

git rm --help

-r

Allow recursive removal when a leading directory name is given.