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