Why do submodules confuse people and what are the common pitfalls?
IntermediateConceptHooks, submodules, LFS and signing
Answer
The parent tracks a commit, not a branch, so after git pull the submodule stays at the old commit until git submodule update. Commits made inside the submodule must be pushed first, otherwise the parent references a SHA nobody else can fetch. Detached HEAD in submodules is the default.
git config submodule.recurse true
git push --recurse-submodules=check
More on Hooks, submodules, LFS and signing
What are Git hooks and where do they live?BeginnerHow do you share hooks with a team, given `.git/hooks` is not committed?IntermediateWhat does the `commit-msg` hook receive and what is it good for?IntermediateWhat do `pre-receive` and `update` hooks do and how do they differ?AdvancedWhat is a Git submodule?BeginnerSubmodules versus subtrees versus a monorepo: how do you choose?Advanced