Make the MSVC projects use PDB/IDB files named after the project
[git/dscho.git] / Documentation / pull-fetch-param.txt
blobf9811f24733bde97b76dc8e695bad82eace5586b
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).
7 <refspec>::
8         The format of a <refspec> parameter is an optional plus
9         `{plus}`, followed by the source ref <src>, followed
10         by a colon `:`, followed by the destination ref <dst>.
12 The remote ref that matches <src>
13 is fetched, and if <dst> is not empty string, the local
14 ref that matches it is fast forwarded using <src>.
15 If the optional plus `+` is used, the local ref
16 is updated even if it does not result in a fast forward
17 update.
19 [NOTE]
20 If the remote branch from which you want to pull is
21 modified in non-linear ways such as being rewound and
22 rebased frequently, then a pull will attempt a merge with
23 an older version of itself, likely conflict, and fail.
24 It is under these conditions that you would want to use
25 the `+` sign to indicate non-fast-forward updates will
26 be needed.  There is currently no easy way to determine
27 or declare that a branch will be made available in a
28 repository with this behavior; the pulling user simply
29 must know this is the expected usage pattern for a branch.
31 [NOTE]
32 You never do your own development on branches that appear
33 on the right hand side of a <refspec> colon on `Pull:` lines;
34 they are to be updated by 'git-fetch'.  If you intend to do
35 development derived from a remote branch `B`, have a `Pull:`
36 line to track it (i.e. `Pull: B:remote-B`), and have a separate
37 branch `my-B` to do your development on top of it.  The latter
38 is created by `git branch my-B remote-B` (or its equivalent `git
39 checkout -b my-B remote-B`).  Run `git fetch` to keep track of
40 the progress of the remote side, and when you see something new
41 on the remote branch, merge it into your development branch with
42 `git pull . remote-B`, while you are on `my-B` branch.
44 [NOTE]
45 There is a difference between listing multiple <refspec>
46 directly on 'git-pull' command line and having multiple
47 `Pull:` <refspec> lines for a <repository> and running
48 'git-pull' command without any explicit <refspec> parameters.
49 <refspec> listed explicitly on the command line are always
50 merged into the current branch after fetching.  In other words,
51 if you list more than one remote refs, you would be making
52 an Octopus.  While 'git-pull' run without any explicit <refspec>
53 parameter takes default <refspec>s from `Pull:` lines, it
54 merges only the first <refspec> found into the current branch,
55 after fetching all the remote refs.  This is because making an
56 Octopus from remote refs is rarely done, while keeping track
57 of multiple remote heads in one-go by fetching more than one
58 is often useful.
60 Some short-cut notations are also supported.
62 * `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
63   it requests fetching everything up to the given tag.
64 * A parameter <ref> without a colon is equivalent to
65   <ref>: when pulling/fetching, so it merges <ref> into the current
66   branch without storing the remote branch anywhere locally