Several days before, I used the submodule feature of git and added quite a lot of repositories, however I remove all of them now(git submodule list returns nothing; also, .git/config and the related .gitmodules do not contain any of the repository information). But git do preserve them: they are still in the directory of .git/modules directory! What annoys me is that they take disk space even I don't need them at all(also I believe I could re-add them as submodule at any time).

So how can I deal with that? Can I simply remove the directory .git/modules?

有帮助吗?

解决方案

Yes, you can rm -rf .git/modules/XXX.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top