- Remove sub module section from the
.gitmodules
file.
nano .gitmodules
- Stage the change
git add .gitmodules
- Remove sub module section from the
.git/config
file.
nano .git/config
- Remove git cache
git rm --cached submodule-path`
- Remove git module files:
rm -rf .git/modules/submodule-path
- Commit changes
git commit -m "Removed submodule"
- Delete untracked submodule files:
rm -rf submodule-path