Code

Merge branch 'bc/filter-branch'
[git.git] / Documentation / urls.txt
index e67f9140ab6be15499b60a8a87ec524a5357a284..fa34c6747194aaecf9e8124462129b8bbc9ae7d4 100644 (file)
@@ -36,5 +36,34 @@ To sync with a local directory, you can use:
 - file:///path/to/repo.git/
 ===============================================================
 
+ifndef::git-clone[]
 They are mostly equivalent, except when cloning.  See
-gitlink:git-clone[1] for details.
+linkgit:git-clone[1] for details.
+endif::git-clone[]
+
+ifdef::git-clone[]
+They are equivalent, except the former implies --local option.
+endif::git-clone[]
+
+
+If there are a large number of similarly-named remote repositories and
+you want to use a different format for them (such that the URLs you
+use will be rewritten into URLs that work), you can create a
+configuration section of the form:
+
+------------
+       [url "<actual url base>"]
+               insteadOf = <other url base>
+------------
+
+For example, with this:
+
+------------
+       [url "git://git.host.xz/"]
+               insteadOf = host.xz:/path/to/
+               insteadOf = work:
+------------
+
+a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
+rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".
+