How to remove git submodules
Sometimes you want to remove an unused submodule. Git 1.8.3 eases the process with the new git submodule deinit
but we can achieve the same effects in previous versions with this steps:
Edit the file
.gitmodules
and.git/config
and delete the submodule's section on both files.Delete the paths on your directory with
git rm -r --cached path/to/MODULE
.Commit the project.
Then you can remove the submodule's path contents (or add it as part of our repository).
Written by Oscar Cubo Medina
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#