- Run
git rm --cached path_to_submodule
(no trailing slash). - Delete the now untracked submodule files by run
rm -rf path_to_submodule
- Run
rm -rf .git/modules/path_to_submodule
- Delete the relevant section from the
.gitmodules
file. - Delete the relevant section from
.git/config
. - Stage the
.gitmodules
changesgit add .gitmodules
- Commit
git commit -m "Removed submodule <name>"
Created
August 25, 2021 02:42
-
-
Save ssrlive/97ca3ad2c3bdeaeca5f6174f6007ef22 to your computer and use it in GitHub Desktop.
How to remove a submodule of git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment