Nov
19th
Wed
19th
Properly removing a git submodule
Oh my.. since I keep stumbling over this every now and then, here’s the 3 steps necessary to completely remove a submodule within a git repository:
- Remove the entry from your “.gitmodules” file
- Look in “.git/config” for an entry for the submodule & remove it, too
- (The important one) … run a “git rm —cached <path/to/submodule>”
And that should be it. Without the 3.) you’ll most likely end up having problems updating your other submodules… with git nagging about “No submodule mapping found in .gitmodules for path ABC”.

