summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-03-05 13:13:03 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-05 13:13:03 -0800
commit069dea89cf2f09101e3ca9a9b3c7a216d61aac10 (patch)
treeea07fa1cbb5592b866105efef439d30c88d548b6
parentMerge branch 'jk/pack-bitmap' into maint (diff)
parentDocumentation/git-remote.txt: stress that set-url is not for triangular (diff)
downloadtgif-069dea89cf2f09101e3ca9a9b3c7a216d61aac10.tar.xz
Merge branch 'jc/remote-set-url-doc' into maint
Clarify in the documentation that "remote.<nick>.pushURL" and "remote.<nick>.URL" are there to name the same repository accessed via different transports, not two separate repositories. * jc/remote-set-url-doc: Documentation/git-remote.txt: stress that set-url is not for triangular
-rw-r--r--Documentation/git-remote.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index cb103c8b6f..a77607b852 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -130,17 +130,25 @@ branches, adds to that list.
'set-url'::
-Changes URL remote points to. Sets first URL remote points to matching
+Changes URLs for the remote. Sets first URL for remote <name> that matches
regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If
-<oldurl> doesn't match any URL, error occurs and nothing is changed.
+<oldurl> doesn't match any URL, an error occurs and nothing is changed.
+
With '--push', push URLs are manipulated instead of fetch URLs.
+
-With '--add', instead of changing some URL, new URL is added.
+With '--add', instead of changing existing URLs, new URL is added.
+
-With '--delete', instead of changing some URL, all URLs matching
-regex <url> are deleted. Trying to delete all non-push URLs is an
-error.
+With '--delete', instead of changing existing URLs, all URLs matching
+regex <url> are deleted for remote <name>. Trying to delete all
+non-push URLs is an error.
++
+Note that the push URL and the fetch URL, even though they can
+be set differently, must still refer to the same place. What you
+pushed to the push URL should be what you would see if you
+immediately fetched from the fetch URL. If you are trying to
+fetch from one place (e.g. your upstream) and push to another (e.g.
+your publishing repository), use two separate remotes.
+
'show'::