Git submodules are super handy and awesome. But quickly become a pain if you dont have them setup right. This link by David Walsh covers how to remove a git submodule on his site, but I’ll put it here to look it up quickly.
Delete the relevant section from the .gitmodules file. The section would look similar to:
Stage the .gitmodules changes via command line using: 1
git add .gitmodules
Delete the relevant section from .git/config, which will look like:
Run
. Don’t include a trailing slash – that will lead to an error.1
git rm --cached path/to/submodule
Run 1
rm -rf .git/modules/submodule_name
Commit the changes
Delete the now untracked submodule files 1
rm -rf path/to/submodule