Git AdvancedLesson 48Free preview
Git Submodules
This lesson is part of Git · All levels
Summary
Submodules allow a repository to include other repositories within it on a specific commit, suitable for internal libraries or shared configurations. Submodules are recorded in the .gitmodules file along with their path and URL. Contributors need to run a git submodule update --init --recursive after cloning to make the submodule content available.
Key points
- Submodule associates other repo to specific commits
- Git submodule add <url> <path> add submodule
- .gitmodules file records the path and URL of the entire submodule
- After clone: git submodule update --init --recursive
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.