git-submodules
Installation
SKILL.md
Git Submodules
A submodule pins a specific commit of an external repo. .gitmodules stores URL+path; the super tree records the SHA as a gitlink.
Cloning
git clone --recurse-submodules <url> # preferred
git submodule update --init --recursive # after a plain clone
Plain clone creates empty dirs. update without --init silently skips new ones.
Default Update = Detached HEAD
git submodule update checks out the pinned SHA detached. Work there is lost on next update unless committed to a branch.