Yes, you can rm -rf .git/modules/XXX
.
How to permantly remove submodules in git repository?
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
?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow