0

The git-clone doc has the following synopsis

git clone [--template=<template-directory>]
      [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
      [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
      [--dissociate] [--separate-git-dir <git-dir>]
      [--depth <depth>] single-branch] [--no-tags]
      [--recurse-submodules[=<pathspec>]] shallow-submodules]
      remote-submodules] [--jobs <n>] [--sparse] reject-shallow]
      [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
      [<directory>]

I see several options w/ missing [s / unpaired ]s. They are

  • single-branch]
  • shallow-submodules]
  • remote-submodules]
  • reject-shallow]
  • [--also-filter-submodules]]

Is foo] a special syntax? Or are these options missing [s?

5
  • 4
    I think those are just typos in the docs github.com/git/git/blob/master/Documentation/… Commented Jul 19, 2024 at 15:54
  • 3
    For most of those I think it might be that it had a [[no] that maybe got edited out by accident e.g. --single-branch can also be used as --no-single-branch Commented Jul 19, 2024 at 15:55
  • 2
    I'd suggest filing a bug on the docs. In general these synopses are not as useful as they might be; they are not complete and they are darned hard to read under the best of circumstances. Commented Jul 19, 2024 at 15:55
  • 2
    @apokryfos I thought of that too - I noticed that all the ones that have this problem have no- alternates. You've probably hit on it. Commented Jul 19, 2024 at 15:56
  • 3
    I reported this bug to the Git mailing list, link here Commented Jul 19, 2024 at 18:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.