Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top