Skip to content

Commit db30b83

Browse files
committed
Merge branch 'jc/remote-set-url-doc'
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
2 parents d3e73b5 + 697f652 commit db30b83

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Documentation/git-remote.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,25 @@ branches, adds to that list.
130130

131131
'set-url'::
132132

133-
Changes URL remote points to. Sets first URL remote points to matching
133+
Changes URLs for the remote. Sets first URL for remote <name> that matches
134134
regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If
135-
<oldurl> doesn't match any URL, error occurs and nothing is changed.
135+
<oldurl> doesn't match any URL, an error occurs and nothing is changed.
136136
+
137137
With '--push', push URLs are manipulated instead of fetch URLs.
138138
+
139-
With '--add', instead of changing some URL, new URL is added.
139+
With '--add', instead of changing existing URLs, new URL is added.
140140
+
141-
With '--delete', instead of changing some URL, all URLs matching
142-
regex <url> are deleted. Trying to delete all non-push URLs is an
143-
error.
141+
With '--delete', instead of changing existing URLs, all URLs matching
142+
regex <url> are deleted for remote <name>. Trying to delete all
143+
non-push URLs is an error.
144+
+
145+
Note that the push URL and the fetch URL, even though they can
146+
be set differently, must still refer to the same place. What you
147+
pushed to the push URL should be what you would see if you
148+
immediately fetched from the fetch URL. If you are trying to
149+
fetch from one place (e.g. your upstream) and push to another (e.g.
150+
your publishing repository), use two separate remotes.
151+
144152

145153
'show'::
146154

0 commit comments

Comments
 (0)