]>
Commit | Line | Data |
---|---|---|
0c04094b | 1 | <repository>:: |
bccf5956 | 2 | The "remote" repository that is the source of a fetch |
58124733 JF |
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). | |
ab9b3138 | 6 | |
9c4a036b BG |
7 | ifndef::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]). | |
12 | endif::git-pull[] | |
13 | ||
ab9b3138 | 14 | <refspec>:: |
7a0d911f | 15 | The format of a <refspec> parameter is an optional plus |
6cf378f0 | 16 | `+`, followed by the source ref <src>, followed |
7a0d911f | 17 | by a colon `:`, followed by the destination ref <dst>. |
b8bdaa97 | 18 | The colon can be omitted when <dst> is empty. |
df8baa42 | 19 | + |
5cc32687 JH |
20 | `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`; |
21 | it requests fetching everything up to the given tag. | |
22 | + | |
3598a308 | 23 | The remote ref that matches <src> |
df8baa42 | 24 | is fetched, and if <dst> is not empty string, the local |
a75d7b54 | 25 | ref that matches it is fast-forwarded using <src>. |
7a0d911f | 26 | If the optional plus `+` is used, the local ref |
a75d7b54 | 27 | is updated even if it does not result in a fast-forward |
df8baa42 JF |
28 | update. |
29 | + | |
bccf5956 | 30 | [NOTE] |
f471dbc5 JH |
31 | When the remote branch you want to fetch is known to |
32 | be rewound and rebased regularly, it is expected that | |
33 | its new tip will not be descendant of its previous tip | |
34 | (as stored in your remote-tracking branch the last time | |
35 | you fetched). You would want | |
36 | to use the `+` sign to indicate non-fast-forward updates | |
37 | will be needed for such branches. There is no way to | |
38 | determine or declare that a branch will be made available | |
39 | in a repository with this behavior; the pulling user simply | |
bccf5956 | 40 | must know this is the expected usage pattern for a branch. |
5d59a32f | 41 | ifdef::git-pull[] |
bccf5956 JL |
42 | + |
43 | [NOTE] | |
fdd08979 | 44 | There is a difference between listing multiple <refspec> |
0b444cdb | 45 | directly on 'git pull' command line and having multiple |
5d59a32f JH |
46 | `remote.<repository>.fetch` entries in your configuration |
47 | for a <repository> and running a | |
0b444cdb | 48 | 'git pull' command without any explicit <refspec> parameters. |
5d59a32f | 49 | <refspec>s listed explicitly on the command line are always |
fdd08979 | 50 | merged into the current branch after fetching. In other words, |
5d59a32f JH |
51 | if you list more than one remote ref, 'git pull' will create |
52 | an Octopus merge. On the other hand, if you do not list any | |
53 | explicit <refspec> parameter on the command line, 'git pull' | |
54 | will fetch all the <refspec>s it finds in the | |
55 | `remote.<repository>.fetch` configuration and merge | |
56 | only the first <refspec> found into the current branch. | |
57 | This is because making an | |
fdd08979 JH |
58 | Octopus from remote refs is rarely done, while keeping track |
59 | of multiple remote heads in one-go by fetching more than one | |
60 | is often useful. | |
5d59a32f | 61 | endif::git-pull[] |