Documentation / fetch-options.txton commit Merge branch 'js/rebase-i-dedup-call-to-rerere' (7267404)
   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--unshallow::
  18        If the source repository is complete, convert a shallow
  19        repository to a complete one, removing all the limitations
  20        imposed by shallow repositories.
  21+
  22If the source repository is shallow, fetch as much as possible so that
  23the current repository has the same history as the source repository.
  24
  25--update-shallow::
  26        By default when fetching from a shallow repository,
  27        `git fetch` refuses refs that require updating
  28        .git/shallow. This option updates .git/shallow and accept such
  29        refs.
  30
  31ifndef::git-pull[]
  32--dry-run::
  33        Show what would be done, without making any changes.
  34endif::git-pull[]
  35
  36-f::
  37--force::
  38        When 'git fetch' is used with `<rbranch>:<lbranch>`
  39        refspec, it refuses to update the local branch
  40        `<lbranch>` unless the remote branch `<rbranch>` it
  41        fetches is a descendant of `<lbranch>`.  This option
  42        overrides that check.
  43
  44-k::
  45--keep::
  46        Keep downloaded pack.
  47
  48ifndef::git-pull[]
  49--multiple::
  50        Allow several <repository> and <group> arguments to be
  51        specified. No <refspec>s may be specified.
  52
  53-p::
  54--prune::
  55        After fetching, remove any remote-tracking references that no
  56        longer exist on the remote.  Tags are not subject to pruning
  57        if they are fetched only because of the default tag
  58        auto-following or due to a --tags option.  However, if tags
  59        are fetched due to an explicit refspec (either on the command
  60        line or in the remote configuration, for example if the remote
  61        was cloned with the --mirror option), then they are also
  62        subject to pruning.
  63endif::git-pull[]
  64
  65ifndef::git-pull[]
  66-n::
  67endif::git-pull[]
  68--no-tags::
  69        By default, tags that point at objects that are downloaded
  70        from the remote repository are fetched and stored locally.
  71        This option disables this automatic tag following. The default
  72        behavior for a remote may be specified with the remote.<name>.tagOpt
  73        setting. See linkgit:git-config[1].
  74
  75ifndef::git-pull[]
  76--refmap=<refspec>::
  77        When fetching refs listed on the command line, use the
  78        specified refspec (can be given more than once) to map the
  79        refs to remote-tracking branches, instead of the values of
  80        `remote.*.fetch` configuration variables for the remote
  81        repository.  See section on "Configured Remote-tracking
  82        Branches" for details.
  83
  84-t::
  85--tags::
  86        Fetch all tags from the remote (i.e., fetch remote tags
  87        `refs/tags/*` into local tags with the same name), in addition
  88        to whatever else would otherwise be fetched.  Using this
  89        option alone does not subject tags to pruning, even if --prune
  90        is used (though tags may be pruned anyway if they are also the
  91        destination of an explicit refspec; see '--prune').
  92
  93--recurse-submodules[=yes|on-demand|no]::
  94        This option controls if and under what conditions new commits of
  95        populated submodules should be fetched too. It can be used as a
  96        boolean option to completely disable recursion when set to 'no' or to
  97        unconditionally recurse into all populated submodules when set to
  98        'yes', which is the default when this option is used without any
  99        value. Use 'on-demand' to only recurse into a populated submodule
 100        when the superproject retrieves a commit that updates the submodule's
 101        reference to a commit that isn't already in the local submodule
 102        clone.
 103
 104-j::
 105--jobs=<n>::
 106        Number of parallel children to be used for fetching submodules.
 107        Each will fetch from different submodules, such that fetching many
 108        submodules will be faster. By default submodules will be fetched
 109        one at a time.
 110
 111--no-recurse-submodules::
 112        Disable recursive fetching of submodules (this has the same effect as
 113        using the '--recurse-submodules=no' option).
 114
 115--submodule-prefix=<path>::
 116        Prepend <path> to paths printed in informative messages
 117        such as "Fetching submodule foo".  This option is used
 118        internally when recursing over submodules.
 119
 120--recurse-submodules-default=[yes|on-demand]::
 121        This option is used internally to temporarily provide a
 122        non-negative default value for the --recurse-submodules
 123        option.  All other methods of configuring fetch's submodule
 124        recursion (such as settings in linkgit:gitmodules[5] and
 125        linkgit:git-config[1]) override this option, as does
 126        specifying --[no-]recurse-submodules directly.
 127endif::git-pull[]
 128
 129-u::
 130--update-head-ok::
 131        By default 'git fetch' refuses to update the head which
 132        corresponds to the current branch.  This flag disables the
 133        check.  This is purely for the internal use for 'git pull'
 134        to communicate with 'git fetch', and unless you are
 135        implementing your own Porcelain you are not supposed to
 136        use it.
 137
 138--upload-pack <upload-pack>::
 139        When given, and the repository to fetch from is handled
 140        by 'git fetch-pack', '--exec=<upload-pack>' is passed to
 141        the command to specify non-default path for the command
 142        run on the other end.
 143
 144ifndef::git-pull[]
 145-q::
 146--quiet::
 147        Pass --quiet to git-fetch-pack and silence any other internally
 148        used git commands. Progress is not reported to the standard error
 149        stream.
 150
 151-v::
 152--verbose::
 153        Be verbose.
 154endif::git-pull[]
 155
 156--progress::
 157        Progress status is reported on the standard error stream
 158        by default when it is attached to a terminal, unless -q
 159        is specified. This flag forces progress status even if the
 160        standard error stream is not directed to a terminal.
 161
 162-4::
 163--ipv4::
 164        Use IPv4 addresses only, ignoring IPv6 addresses.
 165
 166-6::
 167--ipv6::
 168        Use IPv6 addresses only, ignoring IPv4 addresses.