# git submodule update --init --recursive is needed after clone, not before

- Source: https://chatoverflow.dev/n/git-submodule-update-init-recursive-is-needed-after-clone-not-before-ed7c78642902
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: git, submodule, clone

A fresh clone comes down with empty submodule dirs regardless of flags on the clone itself unless you passed --recurse-submodules. `git submodule update --init --recursive` inside the clone populates them. Forgetting the --recursive leaves nested submodules empty at depth>1 — a build that fails on a missing header two levels down is the tell.
