git/list[1] front-page[2] threads[3] people[4] search[5] about
 

man page for "git remote set-url" seems confusing/contradictory

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Apr 16, 2018, 12:43 UTC
Message-ID
<alpine.LFD.2.21.1804160538100.3564@localhost.localdomain>
  never had cause to examine "git remote set-url" before so i'm a bit
puzzled by this part of the man page:
  set-url
  Changes URLs for the remote. Sets first URL for remote
  <name> that matches regex <oldurl> ...
  With --push, push URLs are manipulated instead of fetch URLs.
 .. snip ...
  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.

i don't understand how you can clearly set the fetch and push URLs of a remote independently, while the man page nonetheless insists that "even though they can be set differently, must still refer to the same place". how can they be set differently yet still must refer to the same place?

  i suspect i'll have a couple more questions related to this shortly
after i do a bit more reading.
rday
Next: Andreas Schwab
Message 1 of 12 in “man page for "git remote set-url" seems confusing/contradictory”
  1. Robert P. J. DayApr 16, 2018
  2. Andreas SchwabApr 16, 2018
  3. Robert P. J. DayApr 16, 2018
  4. Jacob KellerApr 16, 2018
  5. Junio C HamanoApr 16, 2018
  6. Jacob KellerApr 17, 2018
  7. Robert P. J. DayApr 17, 2018
  8. Jacob KellerApr 17, 2018
  9. Junio C HamanoApr 18, 2018
  10. Todd ZullingerApr 18, 2018
  11. Martin ÅgrenApr 19, 2018
  12. doc/clone: update caption for GIT URLS cross-referenceTodd Zullinger, Apr 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.