Interface CloneOptions

CloneOptions defines the supported options for the Git clone command.

Hierarchy

  • CloneOptions

Properties

--bare?: null

Creates a bare Git repository.

--branch?: string

Points to the specified branch after cloning.

--config?: [string, string] | [string, string][]

Sets a configuration variable in the cloned repository.

--depth?: string | number

Creates a shallow clone with a history truncated to the specified number of commits.

--dissociate?: null

Stops the borrowing initiated by --reference.

--filter?: string

Selects a subset of reachable objects.

--jobs?: string | number

Specifies the number of submodules fetched simultaneously.

--local?: null

Bypasses the "Git aware" transport mechanism.

--mirror?: null

Sets up a mirror of the source repository.

--no-checkout?: null

Does not checkout HEAD after the clone is complete.

--no-hardlinks?: null

Copies files instead of using hardlinks on a local filesystem.

--no-reject-shallow?: null

The complement of --reject-shallow.

--no-remote-submodules?: null

The complement of --remote-submodules.

--no-shallow-submodules?: null

The complement of --shallow-submodules.

--no-single-branch?: null

The complement of --single-branch.

--no-tags?: null

Does not clone any tags.

--origin?: string

Specifies the remote name of the upstream repository. If unspecified, the value origin is used.

--progress?: null

Forces progress reports to the standard error stream.

--quiet?: null

Suppresses progress reports to the standard error stream.

--recurse-submodules?: string | string[]

Initializes and clones submodules based on the provided pathspec after cloning.

--reference?: string

Obtains objects from the reference repository on the local machine.

--reference-if-able?: string

Performs a --reference if the reference exists; otherwise, ignores with a warning.

--reject-shallow?: null

Fails if the source is a shallow repository. See also --no-reject-shallow.

--remote-submodules?: null

Submodules which are cloned will use the status of the submodule’s remote-tracking branch to update the submodule, rather than the superproject’s recorded SHA-1.

--separate-git-dir?: string

Separates the repository from working tree.

--server-option?: string | string[]

Transmits the given strings to the server when communicating using protocol version 2.

--shallow-exclude?: string | string[]

Creates a shallow clone with a history, excluding commits reachable from the specified remote branch or tag.

--shallow-since?: string | Date

Creates a shallow clone with history after the specified time.

--shallow-submodules?: null

Clones submodules with a depth of 1. See also --no-shallow-submodules.

--shared?: null

Shares objects with the source repository on a local machine.

--single-branch?: null

Clones only the history leading to the tip of a single branch. See also --no-single-branch.

--sparse?: null

Employs a sparse-checkout, with only files in the top-level directory initially being present.

--template?: string

Specifies the directory from which templates will be used.

--upload-pack?: string

Specifies a non-default path for the command run on the other end when accessed via ssh.

--verbose?: null

Sends additional progress information to the standard error stream. The --verbose option is independent of --progress and --quiet.