如何在Git中从远程存储库中删除已删除的文件夹?

问题描述:

我从本地Git存储库中删除了一个文件夹,然后我提交并将更改推送到远程存储库,文件被删除,但文件夹和子文件夹仍然存在。我怎样才能从远程存储库中删除空文件夹?

i deleted a folder from my local Git repository then i committed and pushed the changes to the remote repository, the files are deleted but the folder and the sub folder are still there. How could i remove the empty folder from the remote repository?

Git实际上并不存储目录。它只是使目录在任何需要它们的地方存放存储库中的文件。如果新克隆仍然创建这些目录,请确保您没有看不到的文件(如.gitignore)。

Git doesn't actually store directories. It just makes directories wherever it needs them to hold the files that are in the repository. If a new clone still creates those directories, make sure you don't have files you can't see (like .gitignore) present.