Need Assistance?

support@tutorialshub.in

Advanced Git

Submodules

ADVERTISEMENT
Git Free Lesson
5 min read
ADVERTISEMENT

What a submodule is

A Git submodule lets one repository reference a specific commit from another repository. The parent project records the exact submodule commit rather than copying the dependency's complete history into the parent repository.

Initialize and update

After cloning a project containing submodules, initialize and update them so the working tree contains the referenced repositories. The parent repository controls which submodule commit is expected.

Use submodules only when the dependency model justifies them

Submodules add workflow complexity. Teams should understand how to update, review and release submodule changes before choosing this model.

ADVERTISEMENT