4.7. Gotchas for Submodules#
Submodules Do Not Update Automatically ⚠️: Submodules are not automatically updated to the latest commit.
Repository Resides in the
.git
Folder of the Parent Repo 🔒: The metadata for submodules is stored in the parent repository’s.git
folder.Submodule Commits Are Detached 🤔: submodules are designed to be pinned to a specific commit and do not track a branch.
Submodule URLs Can Change 🔗: You might need to update the
.gitmodules
file manually.Cloning with Submodules Requires Extra Steps 🛠️: Remember to use the
--recurse-submodule
option when cloning.Submodules Can Increase Complexity 🌀: This might be confusing for newcomers.