]>
Commit | Line | Data |
---|---|---|
85a97d4e BF |
1 | GIT URLS[[URLS]] |
2 | ---------------- | |
3 | ||
3598a308 BF |
4 | One of the following notations can be used |
5 | to name the remote repository: | |
85a97d4e | 6 | |
3598a308 BF |
7 | =============================================================== |
8 | - rsync://host.xz/path/to/repo.git/ | |
9 | - http://host.xz/path/to/repo.git/ | |
10 | - https://host.xz/path/to/repo.git/ | |
11 | - git://host.xz/path/to/repo.git/ | |
12 | - git://host.xz/~user/path/to/repo.git/ | |
13 | - ssh://host.xz/path/to/repo.git/ | |
14 | - ssh://host.xz/~user/path/to/repo.git/ | |
15 | - ssh://host.xz/~/path/to/repo.git | |
16 | =============================================================== | |
85a97d4e | 17 | |
3598a308 BF |
18 | SSH Is the default transport protocol and also supports an |
19 | scp-like syntax. Both syntaxes support username expansion, | |
20 | as does the native git protocol. The following three are | |
21 | identical to the last three above, respectively: | |
85a97d4e | 22 | |
3598a308 BF |
23 | =============================================================== |
24 | - host.xz:/path/to/repo.git/ | |
25 | - host.xz:~user/path/to/repo.git/ | |
26 | - host.xz:path/to/repo.git | |
27 | =============================================================== | |
85a97d4e | 28 | |
3598a308 | 29 | To sync with a local directory, use: |
85a97d4e | 30 | |
3598a308 BF |
31 | =============================================================== |
32 | - /path/to/repo.git/ | |
33 | =============================================================== | |
85a97d4e BF |
34 | |
35 | REMOTES | |
36 | ------- | |
37 | ||
3598a308 BF |
38 | In addition to the above, as a short-hand, the name of a |
39 | file in `$GIT_DIR/remotes` directory can be given; the | |
40 | named file should be in the following format: | |
85a97d4e | 41 | |
3598a308 BF |
42 | URL: one of the above URL format |
43 | Push: <refspec> | |
44 | Pull: <refspec> | |
85a97d4e BF |
45 | |
46 | Then such a short-hand is specified in place of | |
3598a308 BF |
47 | <repository> without <refspec> parameters on the command |
48 | line, <refspec> specified on `Push:` lines or `Pull:` | |
49 | lines are used for `git-push` and `git-fetch`/`git-pull`, | |
50 | respectively. Multiple `Push:` and and `Pull:` lines may | |
51 | be specified for additional branch mappings. | |
85a97d4e | 52 | |
3598a308 BF |
53 | The name of a file in `$GIT_DIR/branches` directory can be |
54 | specified as an older notation short-hand; the named | |
55 | file should contain a single line, a URL in one of the | |
56 | above formats, optionally followed by a hash `#` and the | |
57 | name of remote head (URL fragment notation). | |
58 | `$GIT_DIR/branches/<remote>` file that stores a <url> | |
59 | without the fragment is equivalent to have this in the | |
60 | corresponding file in the `$GIT_DIR/remotes/` directory. | |
85a97d4e | 61 | |
3598a308 BF |
62 | URL: <url> |
63 | Pull: refs/heads/master:<remote> | |
85a97d4e | 64 | |
3598a308 | 65 | while having `<url>#<head>` is equivalent to |
85a97d4e | 66 | |
3598a308 BF |
67 | URL: <url> |
68 | Pull: refs/heads/<head>:<remote> |