threads / discuss / 64963

missing git documentation for "git clone --recursive"

Subject: missing git documentation for "git clone --recursive"

## tl;dr

3 messages between Feb 9, 2026 and Feb 9, 2026.

replies: 2people: 3as markdown or json

markusd112@web.de· Feb 9, 2026, 20:34 UTC · lore
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
Junio C Hamano· Feb 9, 2026, 22:01 UTC · re: markusd112@web.de · lore

Re: missing git documentation for "git clone --recursive"

markusd112@web.de 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)?

D. Ben Knoble· Feb 9, 2026, 22:03 UTC · re: markusd112@web.de · lore

Re: missing git documentation for "git clone --recursive"

On Mon, Feb 9, 2026 at 3:35 PM <markusd112@web.de> wrote:
Show 20 quoted lines
>
> 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

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.

-- 
D. Ben Knoble

← back to recent threads