This is a note about removing a Git submodule completely.
- Revise the
.gitmodules
by removing the reference to the submodule Git repo; - Revise the
.git/config
file by removing the reference to the submodule Git repo; - Remove the submodule from Git index, e.g.,
git rm --cached path_to_submodule
- Delelete the meta data from .git directory, by removing
.git/module/path_to_submodule
- Stage the changes, and commit the changes, e.g.,
git add -u git commit -m "removed the submodule"
Reference
The above is a summary from these references