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