Skip to contentSkip to conversation

missing git documentation for "git clone --recursive"

DISCUSSION [email protected] 3 participants 3 messages Feb 9

lore
Share & tools
lore
#0 lore raw

Hi,

I am missing the argument "--recursive" for the git clone command in the git-clone documentation

https://git-scm.com/docs/git-clone

Is this --recursive argument outdated? In some projects there is the following command in the documentation that clones the repository including init and update submodules:

git clone --recursive (url)

In the git documentation only "--recurse-submodules" is mentioned as allowed argument, but not "--recursive".

Thanks

Markus

#1 lore raw
Quoted 2 lines · [email protected] writes:

In the git documentation only "--recurse-submodules" is mentioned as allowed argument, but not "--recursive".

Correct. Do not use it.

In the early days, we mistakenly used "--recursive" to mean "--recurse-submodules".

After we realized the mistake, we would have preferred if we could remove it right away, but in order to avoid breaking existing users, the command is taught to still notice "--recursive" and behave the same as "--recurse-submodules", but stopped advertising the former in "git clone -h" and "git clone --help".

This reminds me. Perhaps we would want to perform an audit for such OPT_HIDDEN aliases and remove them at the Git 3.0 boundary (this needs a separate thread to discuss)?

#2 lore raw
In reply to [email protected]
Quoted 12 lines · On Mon, Feb 9, 2026 at 3:35 PM <[email protected]> wrote:

Hi,

I am missing the argument "--recursive" for the git clone command in the git-clone documentation

https://git-scm.com/docs/git-clone

Is this --recursive argument outdated? In some projects there is the following command in the documentation that clones the repository including init and update submodules:

Quoted 8 lines

git clone --recursive (url)

In the git documentation only "--recurse-submodules" is mentioned as allowed argument, but not "--recursive".

Thanks

Markus

The latter is a (now-undocumented) alias for the former. See 5c387428f1 (parse-options: don't emit "ambiguous option" for aliases, 2019-04-29) and referenced commits (like ccdd3da652 (clone: Add the --recurse-submodules option as alias for --recursive, 2010-11-04)) for some details.

Signature · 1 line
D. Ben Knoble