git-gui: fix usage of themed widgets variable
[git/dscho.git] / Documentation / urls.txt
blob459a394dc0eb2c7ebecc7c9cf53808d791187006
1 GIT URLS[[URLS]]
2 ----------------
4 One of the following notations can be used
5 to name the remote repository:
7 - rsync://host.xz/path/to/repo.git/
8 - http://host.xz{startsb}:port{endsb}/path/to/repo.git/
9 - https://host.xz{startsb}:port{endsb}/path/to/repo.git/
10 - git://host.xz{startsb}:port{endsb}/path/to/repo.git/
11 - git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
12 - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/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
17 SSH is the default transport protocol over the network.  You can
18 optionally specify which user to log-in as, and an alternate,
19 scp-like syntax is also supported.  Both syntaxes support
20 username expansion, as does the native git protocol, but
21 only the former supports port specification. The following
22 three are identical to the last three above, respectively:
24 - {startsb}user@{endsb}host.xz:/path/to/repo.git/
25 - {startsb}user@{endsb}host.xz:~user/path/to/repo.git/
26 - {startsb}user@{endsb}host.xz:path/to/repo.git
28 To sync with a local directory, you can use:
30 - /path/to/repo.git/
31 - file:///path/to/repo.git/
33 ifndef::git-clone[]
34 They are mostly equivalent, except when cloning.  See
35 linkgit:git-clone[1] for details.
36 endif::git-clone[]
38 ifdef::git-clone[]
39 They are equivalent, except the former implies --local option.
40 endif::git-clone[]
43 If there are a large number of similarly-named remote repositories and
44 you want to use a different format for them (such that the URLs you
45 use will be rewritten into URLs that work), you can create a
46 configuration section of the form:
48 ------------
49         [url "<actual url base>"]
50                 insteadOf = <other url base>
51 ------------
53 For example, with this:
55 ------------
56         [url "git://git.host.xz/"]
57                 insteadOf = host.xz:/path/to/
58                 insteadOf = work:
59 ------------
61 a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
62 rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".
64 If you want to rewrite URLs for push only, you can create a
65 configuration section of the form:
67 ------------
68         [url "<actual url base>"]
69                 pushInsteadOf = <other url base>
70 ------------
72 For example, with this:
74 ------------
75         [url "ssh://example.org/"]
76                 pushInsteadOf = git://example.org/
77 ------------
79 a URL like "git://example.org/path/to/repo.git" will be rewritten to
80 "ssh://example.org/path/to/repo.git" for pushes, but pulls will still
81 use the original URL.