4 One of the following notations can be used
5 to name the remote repository:
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://{startsb}user@{endsb}host.xz/path/to/repo.git/
14 - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
15 - ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git
16 ===============================================================
18 SSH is the default transport protocol. You can optionally specify
19 which user to log-in as, and an alternate, scp-like syntax is also
20 supported. Both syntaxes support username expansion,
21 as does the native git protocol. The following three are
22 identical to the last three above, respectively:
24 ===============================================================
25 - {startsb}user@{endsb}host.xz:/path/to/repo.git/
26 - {startsb}user@{endsb}host.xz:~user/path/to/repo.git/
27 - {startsb}user@{endsb}host.xz:path/to/repo.git
28 ===============================================================
30 To sync with a local directory, use:
32 ===============================================================
34 ===============================================================
39 In addition to the above, as a short-hand, the name of a
40 file in `$GIT_DIR/remotes` directory can be given; the
41 named file should be in the following format:
43 URL: one of the above URL format
47 Then such a short-hand is specified in place of
48 <repository> without <refspec> parameters on the command
49 line, <refspec> specified on `Push:` lines or `Pull:`
50 lines are used for `git-push` and `git-fetch`/`git-pull`,
51 respectively. Multiple `Push:` and `Pull:` lines may
52 be specified for additional branch mappings.
54 Or, equivalently, in the `$GIT_DIR/config` (note the use
55 of `fetch` instead of `Pull:`):
62 The name of a file in `$GIT_DIR/branches` directory can be
63 specified as an older notation short-hand; the named
64 file should contain a single line, a URL in one of the
65 above formats, optionally followed by a hash `#` and the
66 name of remote head (URL fragment notation).
67 `$GIT_DIR/branches/<remote>` file that stores a <url>
68 without the fragment is equivalent to have this in the
69 corresponding file in the `$GIT_DIR/remotes/` directory.
72 Pull: refs/heads/master:<remote>
74 while having `<url>#<head>` is equivalent to
77 Pull: refs/heads/<head>:<remote>