Documentation / fetch-options.txton commit config.txt: move pull part out to a separate file (0475029)
   1--all::
   2        Fetch all remotes.
   3
   4-a::
   5--append::
   6        Append ref names and object names of fetched refs to the
   7        existing contents of `.git/FETCH_HEAD`.  Without this
   8        option old data in `.git/FETCH_HEAD` will be overwritten.
   9
  10--depth=<depth>::
  11        Limit fetching to the specified number of commits from the tip of
  12        each remote branch history. If fetching to a 'shallow' repository
  13        created by `git clone` with `--depth=<depth>` option (see
  14        linkgit:git-clone[1]), deepen or shorten the history to the specified
  15        number of commits. Tags for the deepened commits are not fetched.
  16
  17--deepen=<depth>::
  18        Similar to --depth, except it specifies the number of commits
  19        from the current shallow boundary instead of from the tip of
  20        each remote branch history.
  21
  22--shallow-since=<date>::
  23        Deepen or shorten the history of a shallow repository to
  24        include all reachable commits after <date>.
  25
  26--shallow-exclude=<revision>::
  27        Deepen or shorten the history of a shallow repository to
  28        exclude commits reachable from a specified remote branch or tag.
  29        This option can be specified multiple times.
  30
  31--unshallow::
  32        If the source repository is complete, convert a shallow
  33        repository to a complete one, removing all the limitations
  34        imposed by shallow repositories.
  35+
  36If the source repository is shallow, fetch as much as possible so that
  37the current repository has the same history as the source repository.
  38
  39--update-shallow::
  40        By default when fetching from a shallow repository,
  41        `git fetch` refuses refs that require updating
  42        .git/shallow. This option updates .git/shallow and accept such
  43        refs.
  44
  45--negotiation-tip=<commit|glob>::
  46        By default, Git will report, to the server, commits reachable
  47        from all local refs to find common commits in an attempt to
  48        reduce the size of the to-be-received packfile. If specified,
  49        Git will only report commits reachable from the given tips.
  50        This is useful to speed up fetches when the user knows which
  51        local ref is likely to have commits in common with the
  52        upstream ref being fetched.
  53+
  54This option may be specified more than once; if so, Git will report
  55commits reachable from any of the given commits.
  56+
  57The argument to this option may be a glob on ref names, a ref, or the (possibly
  58abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
  59this option multiple times, one for each matching ref name.
  60+
  61See also the `fetch.negotiationAlgorithm` configuration variable
  62documented in linkgit:git-config[1].
  63
  64ifndef::git-pull[]
  65--dry-run::
  66        Show what would be done, without making any changes.
  67endif::git-pull[]
  68
  69-f::
  70--force::
  71        When 'git fetch' is used with `<rbranch>:<lbranch>`
  72        refspec, it refuses to update the local branch
  73        `<lbranch>` unless the remote branch `<rbranch>` it
  74        fetches is a descendant of `<lbranch>`.  This option
  75        overrides that check.
  76
  77-k::
  78--keep::
  79        Keep downloaded pack.
  80
  81ifndef::git-pull[]
  82--multiple::
  83        Allow several <repository> and <group> arguments to be
  84        specified. No <refspec>s may be specified.
  85
  86-p::
  87--prune::
  88        Before fetching, remove any remote-tracking references that no
  89        longer exist on the remote.  Tags are not subject to pruning
  90        if they are fetched only because of the default tag
  91        auto-following or due to a --tags option.  However, if tags
  92        are fetched due to an explicit refspec (either on the command
  93        line or in the remote configuration, for example if the remote
  94        was cloned with the --mirror option), then they are also
  95        subject to pruning. Supplying `--prune-tags` is a shorthand for
  96        providing the tag refspec.
  97+
  98See the PRUNING section below for more details.
  99
 100-P::
 101--prune-tags::
 102        Before fetching, remove any local tags that no longer exist on
 103        the remote if `--prune` is enabled. This option should be used
 104        more carefully, unlike `--prune` it will remove any local
 105        references (local tags) that have been created. This option is
 106        a shorthand for providing the explicit tag refspec along with
 107        `--prune`, see the discussion about that in its documentation.
 108+
 109See the PRUNING section below for more details.
 110
 111endif::git-pull[]
 112
 113ifndef::git-pull[]
 114-n::
 115endif::git-pull[]
 116--no-tags::
 117        By default, tags that point at objects that are downloaded
 118        from the remote repository are fetched and stored locally.
 119        This option disables this automatic tag following. The default
 120        behavior for a remote may be specified with the remote.<name>.tagOpt
 121        setting. See linkgit:git-config[1].
 122
 123ifndef::git-pull[]
 124--refmap=<refspec>::
 125        When fetching refs listed on the command line, use the
 126        specified refspec (can be given more than once) to map the
 127        refs to remote-tracking branches, instead of the values of
 128        `remote.*.fetch` configuration variables for the remote
 129        repository.  See section on "Configured Remote-tracking
 130        Branches" for details.
 131
 132-t::
 133--tags::
 134        Fetch all tags from the remote (i.e., fetch remote tags
 135        `refs/tags/*` into local tags with the same name), in addition
 136        to whatever else would otherwise be fetched.  Using this
 137        option alone does not subject tags to pruning, even if --prune
 138        is used (though tags may be pruned anyway if they are also the
 139        destination of an explicit refspec; see `--prune`).
 140
 141--recurse-submodules[=yes|on-demand|no]::
 142        This option controls if and under what conditions new commits of
 143        populated submodules should be fetched too. It can be used as a
 144        boolean option to completely disable recursion when set to 'no' or to
 145        unconditionally recurse into all populated submodules when set to
 146        'yes', which is the default when this option is used without any
 147        value. Use 'on-demand' to only recurse into a populated submodule
 148        when the superproject retrieves a commit that updates the submodule's
 149        reference to a commit that isn't already in the local submodule
 150        clone.
 151
 152-j::
 153--jobs=<n>::
 154        Number of parallel children to be used for fetching submodules.
 155        Each will fetch from different submodules, such that fetching many
 156        submodules will be faster. By default submodules will be fetched
 157        one at a time.
 158
 159--no-recurse-submodules::
 160        Disable recursive fetching of submodules (this has the same effect as
 161        using the `--recurse-submodules=no` option).
 162
 163--submodule-prefix=<path>::
 164        Prepend <path> to paths printed in informative messages
 165        such as "Fetching submodule foo".  This option is used
 166        internally when recursing over submodules.
 167
 168--recurse-submodules-default=[yes|on-demand]::
 169        This option is used internally to temporarily provide a
 170        non-negative default value for the --recurse-submodules
 171        option.  All other methods of configuring fetch's submodule
 172        recursion (such as settings in linkgit:gitmodules[5] and
 173        linkgit:git-config[1]) override this option, as does
 174        specifying --[no-]recurse-submodules directly.
 175endif::git-pull[]
 176
 177-u::
 178--update-head-ok::
 179        By default 'git fetch' refuses to update the head which
 180        corresponds to the current branch.  This flag disables the
 181        check.  This is purely for the internal use for 'git pull'
 182        to communicate with 'git fetch', and unless you are
 183        implementing your own Porcelain you are not supposed to
 184        use it.
 185
 186--upload-pack <upload-pack>::
 187        When given, and the repository to fetch from is handled
 188        by 'git fetch-pack', `--exec=<upload-pack>` is passed to
 189        the command to specify non-default path for the command
 190        run on the other end.
 191
 192ifndef::git-pull[]
 193-q::
 194--quiet::
 195        Pass --quiet to git-fetch-pack and silence any other internally
 196        used git commands. Progress is not reported to the standard error
 197        stream.
 198
 199-v::
 200--verbose::
 201        Be verbose.
 202endif::git-pull[]
 203
 204--progress::
 205        Progress status is reported on the standard error stream
 206        by default when it is attached to a terminal, unless -q
 207        is specified. This flag forces progress status even if the
 208        standard error stream is not directed to a terminal.
 209
 210-o <option>::
 211--server-option=<option>::
 212        Transmit the given string to the server when communicating using
 213        protocol version 2.  The given string must not contain a NUL or LF
 214        character.
 215        When multiple `--server-option=<option>` are given, they are all
 216        sent to the other side in the order listed on the command line.
 217
 218-4::
 219--ipv4::
 220        Use IPv4 addresses only, ignoring IPv6 addresses.
 221
 222-6::
 223--ipv6::
 224        Use IPv6 addresses only, ignoring IPv4 addresses.