How do I remove a Git submodule?
By the way, is there a reason I can't simply do
git submodule rm whatever
?
Via the page Git Submodule Tutorial:
To remove a submodule you need to:
.gitmodules
file..gitmodules
changes:git add .gitmodules
.git/config
.git rm --cached path_to_submodule
(no trailing slash)..git
directory:rm -rf .git/modules/path_to_submodule
git commit -m "Removed submodule <name>"
rm -rf path_to_submodule
See also: alternative steps below.