summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-pull.adoc32
-rw-r--r--Documentation/pull-fetch-param.adoc1
2 files changed, 22 insertions, 11 deletions
diff --git a/Documentation/git-pull.adoc b/Documentation/git-pull.adoc
index 48e924a10a..a3d248dd1d 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.
-<repository> should be the name of a remote repository as
-passed to linkgit:git-fetch[1]. <refspec> 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 <repository> and <branch> 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,26 @@ pulling or stash them away with linkgit:git-stash[1].
OPTIONS
-------
+<repository>::
+ The "remote" repository to pull from. This can be either
+ a URL (see the section <<URLS,GIT URLS>> below) or the name
+ of a remote (see the section <<REMOTES,REMOTES>> below).
++
+Defaults to the configured upstream for the current branch, or `origin`.
+See <<UPSTREAM-BRANCHES,UPSTREAM BRANCHES>> below for more on how to
+configure upstreams.
+
+<refspec>::
+ 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 <<fetch-refspec,<refspec>>> below under "Options related to fetching"
+for the full syntax, and <<DEFAULT-BEHAVIOUR,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
@@ -145,6 +154,7 @@ include::urls-remotes.adoc[]
include::merge-strategies.adoc[]
+[[DEFAULT-BEHAVIOUR]]
DEFAULT BEHAVIOUR
-----------------
diff --git a/Documentation/pull-fetch-param.adoc b/Documentation/pull-fetch-param.adoc
index d79d2f6065..bb2cf6a462 100644
--- a/Documentation/pull-fetch-param.adoc
+++ b/Documentation/pull-fetch-param.adoc
@@ -11,6 +11,7 @@ ifndef::git-pull[]
(See linkgit:git-config[1]).
endif::git-pull[]
+[[fetch-refspec]]
<refspec>::
Specifies which refs to fetch and which local refs to update.
When no <refspec>s appear on the command line, the refs to fetch