`--recurse-submodules=[yes|on-demand]`.
Internally this is used to implement the `push.negotiate` option, see
linkgit:git-config[1].
--dry-run::
Show what would be done, without making any changes.
--porcelain::
Print the output to standard output in an easy-to-parse format for
scripts. See section OUTPUT in linkgit:git-fetch[1] for details.
+
This is incompatible with `--recurse-submodules=[yes|on-demand]` and takes
precedence over the `fetch.output` config option.
ifndef::git-pull[]
--[no-]write-fetch-head::
Write the list of remote refs fetched in the `FETCH_HEAD`
file directly under `$GIT_DIR`. This is the default.
Passing `--no-write-fetch-head` from the command line tells
Git not to write the file. Under `--dry-run` option, the
file is never written.
endif::git-pull[]
-f::
--force::
When 'git fetch' is used with `<src>:<dst>` refspec, it may
refuse to update the local branch as discussed
ifdef::git-pull[]
in the `<refspec>` part of the linkgit:git-fetch[1]
documentation.
endif::git-pull[]
ifndef::git-pull[]
in the `<refspec>` part below.
endif::git-pull[]
This option overrides that check.
-k::
--keep::
Keep downloaded pack.
ifndef::git-pull[]
--multiple::
Allow several <repository> and <group> arguments to be
specified. No <refspec>s may be specified.
--[no-]auto-maintenance::
--[no-]auto-gc::
Run `git maintenance run --auto` at the end to perform automatic
repository maintenance if needed. (`--[no-]auto-gc` is a synonym.)
This is enabled by default.
--[no-]write-commit-graph::
Write a commit-graph after fetching. This overrides the config
setting `fetch.writeCommitGraph`.
endif::git-pull[]
--prefetch::
Modify the configured refspec to place all refs into the
`refs/prefetch/` namespace. See the `prefetch` task in
linkgit:git-maintenance[1].
-p::
--prune::
Before fetching, remove any remote-tracking references that no
longer exist on the remote. Tags are not subject to pruning
if they are fetched only because of the default tag
auto-following or due to a --tags option. However, if tags
are fetched due to an explicit refspec (either on the command
line or in the remote configuration, for example if the remote
was cloned with the --mirror option), then they are also
subject to pruning. Supplying `--prune-tags` is a shorthand for
providing the tag refspec.
ifndef::git-pull[]
+
See the PRUNING section below for more details.
-P::
--prune-tags::
Before fetching, remove any local tags that no longer exist on
the remote if `--prune` is enabled. This option should be used
more carefully, unlike `--prune` it will remove any local
references (local tags) that have been created. This option is
a shorthand for providing the explicit tag refspec along with
`--prune`, see the discussion about that in its documentation.
+
See the PRUNING section below for more details.
endif::git-pull[]
ifndef::git-pull[]
-n::
endif::git-pull[]
--no-tags::
By default, tags that point at objects that are downloaded
from the remote repository are fetched and stored locally.
This option disables this automatic tag following. The default
behavior for a remote may be specified with the remote.<name>.tagOpt
setting. See linkgit:git-config[1].
ifndef::git-pull[]
--refetch::
Instead of negotiating with the server to avoid transferring commits and
associated objects that are already present locally, this option fetches
all objects as a fresh clone would. Use this to reapply a partial clone
filter from configuration or using `--filter=` when the filter
definition has changed. Automatic post-fetch maintenance will perform
object database pack consolidation to remove any duplicate objects.
endif::git-pull[]
--refmap=<refspec>::
When fetching refs listed on the command line, use the
specified refspec (can be given more than once) to map the
refs to remote-tracking branches, instead of the values of
`remote.*.fetch` configuration variables for the remote
repository. Providing an empty `<refspec>`