1<repository>:: 2 The "remote" repository that is the source of a fetch 3 or pull operation. This parameter can be either a URL 4 (see the section <<URLS,GIT URLS>> below) or the name 5 of a remote (see the section <<REMOTES,REMOTES>> below). 6 7ifndef::git-pull[] 8<group>:: 9 A name referring to a list of repositories as the value 10 of remotes.<group> in the configuration file. 11 (See linkgit:git-config[1]). 12endif::git-pull[] 13 14<refspec>:: 15 The format of a <refspec> parameter is an optional plus 16 `+`, followed by the source ref <src>, followed 17 by a colon `:`, followed by the destination ref <dst>. 18 The colon can be omitted when <dst> is empty. 19+ 20The remote ref that matches <src> 21is fetched, and if <dst> is not empty string, the local 22ref that matches it is fast-forwarded using <src>. 23If the optional plus `+` is used, the local ref 24is updated even if it does not result in a fast-forward 25update. 26+ 27[NOTE] 28When the remote branch you want to fetch is known to 29be rewound and rebased regularly, it is expected that 30its new tip will not be descendant of its previous tip 31(as stored in your remote-tracking branch the last time 32you fetched). You would want 33to use the `+` sign to indicate non-fast-forward updates 34will be needed for such branches. There is no way to 35determine or declare that a branch will be made available 36in a repository with this behavior; the pulling user simply 37must know this is the expected usage pattern for a branch. 38ifdef::git-pull[] 39+ 40[NOTE] 41There is a difference between listing multiple <refspec> 42directly on 'git pull' command line and having multiple 43`remote.<repository>.fetch` entries in your configuration 44for a <repository> and running a 45'git pull' command without any explicit <refspec> parameters. 46<refspec>s listed explicitly on the command line are always 47merged into the current branch after fetching. In other words, 48if you list more than one remote ref, 'git pull' will create 49an Octopus merge. On the other hand, if you do not list any 50explicit <refspec> parameter on the command line, 'git pull' 51will fetch all the <refspec>s it finds in the 52`remote.<repository>.fetch` configuration and merge 53only the first <refspec> found into the current branch. 54This is because making an 55Octopus from remote refs is rarely done, while keeping track 56of multiple remote heads in one-go by fetching more than one 57is often useful. 58endif::git-pull[] 59+ 60Some short-cut notations are also supported. 61+ 62* `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`; 63 it requests fetching everything up to the given tag. 64ifndef::git-pull[] 65* A parameter <ref> without a colon fetches that ref into FETCH_HEAD, 66endif::git-pull[] 67ifdef::git-pull[] 68* A parameter <ref> without a colon merges <ref> into the current 69 branch, 70endif::git-pull[] 71 and updates the remote-tracking branches (if any).