Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

git
submodule
communitycreator

How to delete a Git submodule

Anjana Shankar

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Git submodules are a powerful way to use Git as an external dependency management toolThis is analogous to creating a soft link on your system.. This shot covers what needs to be done when you delete a project that has a submodule in it.

There are four steps involved when you delete a submodule.

1. deinit the submodule

git submodule deinit <submodule_directory>

2. Remove the submodule directory from Git

git rm <submodule_directory>

3. Remove the submodule directory from .git/modules/

rm -rf .git/modules/<submodule_directory>

4. commit and push the changes

git commit -m"Removed Submodule"
git push

RELATED TAGS

git
submodule
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring