Skip to content

Latest commit

 

History

History
57 lines (52 loc) · 2.06 KB

File metadata and controls

57 lines (52 loc) · 2.06 KB
clone.defaultRemoteName

The name of the remote to create when cloning a repository. Defaults to origin. It can be overridden by passing the --origin command-line option to linkgit:git-clone[1].

clone.rejectShallow

Reject cloning a repository if it is a shallow one; this can be overridden by passing the --reject-shallow option on the command line. See linkgit:git-clone[1].

clone.filterSubmodules

If a partial clone filter is provided (see --filter in linkgit:git-rev-list[1]) and --recurse-submodules is used, also apply the filter to submodules.

clone.defaultObjectFilter
clone.<url>.defaultObjectFilter

When set to a filter spec string (e.g., blob:limit=1m, blob:none, tree:0), linkgit:git-clone[1] will automatically use --filter=<value> to enable partial clone behavior. Objects matching the filter are excluded from the initial transfer and lazily fetched on demand (e.g., during checkout). Subsequent fetches inherit the filter via the per-remote config that is written during the clone.

The bare clone.defaultObjectFilter applies to all clones. The URL-qualified form clone.<url>.defaultObjectFilter restricts the setting to clones whose URL matches <url>, following the same rules as http.<url>.* (see linkgit:git-config[1]). The most specific URL match wins. You can match a domain, a namespace, or a specific project:

[clone]
    defaultObjectFilter = blob:limit=1m

[clone "https://github.com/"]
    defaultObjectFilter = blob:limit=5m

[clone "https://internal.corp.com/large-project/"]
    defaultObjectFilter = blob:none

An explicit --filter option on the command line takes precedence over this config, and --no-filter defeats it entirely to force a full clone. Only affects the initial clone; it has no effect on later fetches into an existing repository. If the server does not support object filtering, the setting is silently ignored.