Demystifying Git Submodules: A Comprehensive Guide#
Git submodules allow you to keep one Git repository as a subdirectory of another. This is a powerful feature for managing dependencies while keeping their histories separate.
In this guide, we’ll use the terms Main Project (Parent) and Submodule (Child) to explain the logic.
1. What is a Git Submodule?#
A submodule is not just a copy of a folder. It is a pointer to a specific commit in another repository.