Hopefully one day there will be `git submodule remove`
Posted by jpluimers on 2019/12/04
I like that you can add git repositories inside eachother using git submodule add
but when it’s time to say goodbye to a submodule you need some convoluted statements. So I really wish one day there will be git submodule remove
.
Until then, these links will help you to get rid of a git submodule:
- [WayBack] Git Submodules: Adding, Using, Removing, Updating :: Chris Jean
- [WayBack] Remove a Submodule within git
- [WayBack] github – What is the current way to remove a git submodule? – Stack Overflow
- [WayBack] git – How do I remove a submodule? – Stack Overflow
- [WayBack] Git – git-submodule Documentation
- [WayBack] Git – Submodules
TL;DR you have to manually edit the below files:
.gitmodules
.git/config
Then you need to:
- (recursively) remove the subdirectory containing the submodule in the repository
- sometimes (recursively) the subdirectory containing the submodule in
.git/modules
–jeroen
Leave a Reply