From: Julia Evans Date: Tue, 23 Sep 2025 19:44:59 +0000 (+0000) Subject: doc: git-pull: move and params X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f931dc3065beda6845e9df6a62f003451fece45f;p=thirdparty%2Fgit.git doc: git-pull: move and params From user feedback: - it's confusing that we use both and to refer to the second argument - one user is not clear about what `refs/heads/*:refs/remotes/origin/*` is meant to be an example of ("is it like a path?") The DESCRIPTION section is also doing a lot right now: it's trying to describe both how the and arguments work (which is pretty complex, as seen in the DEFAULT BEHAVIOUR section) as well as how `git pull` calls `git fetch` and merge/rebase/etc depending on the arguments. Handle this by moving the description of the and arguments to the OPTIONS section, so that we can focus on the merge/rebase/etc behaviour in the DESCRIPTION section, and refer folks to the later sections for details. Use the term "upstream" instead of 'the "remote" and "merge" configuration for the current branch' since users are more likely to know what an "upstream" is. Signed-off-by: Julia Evans Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-pull.adoc b/Documentation/git-pull.adoc index 48e924a10a..50af7fde81 100644 --- a/Documentation/git-pull.adoc +++ b/Documentation/git-pull.adoc @@ -27,17 +27,6 @@ and then depending on configuration options or command line flags, will call either `git rebase` or `git merge` to reconcile diverging branches. - should be the name of a remote repository as -passed to linkgit:git-fetch[1]. can name an -arbitrary remote ref (for example, the name of a tag) or even -a collection of refs with corresponding remote-tracking branches -(e.g., refs/heads/{asterisk}:refs/remotes/origin/{asterisk}), -but usually it is the name of a branch in the remote repository. - -Default values for and are read from the -"remote" and "merge" configuration for the current branch -as set by linkgit:git-branch[1] `--track`. - Assume the following history exists and the current branch is "`master`": @@ -77,6 +66,24 @@ pulling or stash them away with linkgit:git-stash[1]. OPTIONS ------- +:: + The "remote" repository to pull from. This can be either + a URL (see the section <> below) or the name + of a remote (see the section <> below). ++ +Defaults to the configured upstream for the current branch, or `origin`. +See UPSTREAM BRANCHES below for more on how to configure upstreams. + +:: + Which branch or other reference(s) to fetch and integrate into the + current branch, for example `main` in `git pull origin main`. + Defaults to the configured upstream for the current branch. ++ +This can be a branch, tag, or other collection of reference(s). +See below under "Options related to fetching" for the full syntax, +and DEFAULT BEHAVIOUR below for how `git pull` uses this argument to +determine which remote branch to integrate. + -q:: --quiet:: This is passed to both underlying git-fetch to squelch reporting of