]>
Commit | Line | Data |
---|---|---|
37ba0561 AR |
1 | include::urls.txt[] |
2 | ||
3 | REMOTES | |
4 | ------- | |
5 | ||
6 | In addition to the above, as a short-hand, the name of a | |
7 | file in `$GIT_DIR/remotes` directory can be given; the | |
8 | named file should be in the following format: | |
9 | ||
10 | ------------ | |
11 | URL: one of the above URL format | |
12 | Push: <refspec> | |
13 | Pull: <refspec> | |
14 | ||
15 | ------------ | |
16 | ||
17 | Then such a short-hand is specified in place of | |
18 | <repository> without <refspec> parameters on the command | |
19 | line, <refspec> specified on `Push:` lines or `Pull:` | |
20 | lines are used for `git-push` and `git-fetch`/`git-pull`, | |
21 | respectively. Multiple `Push:` and `Pull:` lines may | |
22 | be specified for additional branch mappings. | |
23 | ||
24 | Or, equivalently, in the `$GIT_DIR/config` (note the use | |
25 | of `fetch` instead of `Pull:`): | |
26 | ||
27 | ------------ | |
28 | [remote "<remote>"] | |
29 | url = <url> | |
30 | push = <refspec> | |
31 | fetch = <refspec> | |
32 | ||
33 | ------------ | |
34 | ||
35 | The name of a file in `$GIT_DIR/branches` directory can be | |
36 | specified as an older notation short-hand; the named | |
37 | file should contain a single line, a URL in one of the | |
38 | above formats, optionally followed by a hash `#` and the | |
39 | name of remote head (URL fragment notation). | |
40 | `$GIT_DIR/branches/<remote>` file that stores a <url> | |
41 | without the fragment is equivalent to have this in the | |
42 | corresponding file in the `$GIT_DIR/remotes/` directory. | |
43 | ||
44 | ------------ | |
45 | URL: <url> | |
46 | Pull: refs/heads/master:<remote> | |
47 | ||
48 | ------------ | |
49 | ||
50 | while having `<url>#<head>` is equivalent to | |
51 | ||
52 | ------------ | |
53 | URL: <url> | |
54 | Pull: refs/heads/<head>:<remote> | |
55 | ------------ |