Skip to content

Commit

Permalink
docs: Explain the purpose of fetch's and pull's <refspec> parameter.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Marc Branchaud authored and Junio C Hamano committed Jun 12, 2014
1 parent c5558f8 commit db4e411
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-fetch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ include::pull-fetch-param.txt[]
include::urls-remotes.txt[]


CONFIGURED REMOTE-TRACKING BRANCHES
-----------------------------------
CONFIGURED REMOTE-TRACKING BRANCHES[[CRTB]]
-------------------------------------------

You often interact with the same remote repository by
regularly and repeatedly fetching from it. In order to keep track
Expand Down
18 changes: 14 additions & 4 deletions Documentation/pull-fetch-param.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ ifndef::git-pull[]
endif::git-pull[]

<refspec>::
The format of a <refspec> parameter is an optional plus
`+`, followed by the source ref <src>, followed
by a colon `:`, followed by the destination ref <dst>.
The colon can be omitted when <dst> is empty.
Specifies which refs to fetch and which local refs to update.
When no <refspec>s appear on the command line, the refs to fetch
are read from `remote.<repository>.fetch` variables instead
ifndef::git-pull[]
(see <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> below).
endif::git-pull[]
ifdef::git-pull[]
(see linkgit:git-fetch[1]).
endif::git-pull[]
+
The format of a <refspec> parameter is an optional plus
`+`, followed by the source ref <src>, followed
by a colon `:`, followed by the destination ref <dst>.
The colon can be omitted when <dst> is empty.
+
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
it requests fetching everything up to the given tag.
Expand Down

0 comments on commit db4e411

Please sign in to comment.