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

Re: Relative submodule URLs

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 19, 2014, 16:39 UTC
Message-ID
<xmqqiolowi1f.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHd499CJfX_n_KnQScTFueCSkj6i0x0ozwwD8Oe_2a-VH2oq1w@mail.gmail.com>
Robert Dailey <rcdailey.lists@gmail.com> writes:
Show 5 quoted lines
> The way I set up my remote tracking branch will be different for each
> of these commands:
>
> - git pull :: If I want convenient pulls (with rebase), I will track
> my upstream branch. My pushes have to be more explicit as a tradeoff.

Keeping 'origin' pointing at the repository where you cloned from, without doing anything funky (i.e. "set up my remote") would give you convenient pulls.

> - git push :: If I want convenient pushes, track my origin branch.
> Pulls become less convenient. My relative submodules will now need to
> be forked.

You need to configure your pushes to go to a different place, if you want them to go to a different place ;-).

Long time ago, it used to be that you have to affect the URL used in both direction, making pulls less conveninent, but hasn't this been made an non-issue for triangular workflows with the introduction of remote.pushdefault long time ago?

> - git submodule update :: I track upstream to avoid forking my
> submodules. But pushes become more inconvenient.

If 'submodule update' follows the same place as 'pull' goes by default, I would imagine that there is no issue here, no? Am I oversimplifying the issue by guessing that the root cause of is that you are not using remote.pushdefault from your configuration toolchest and instead setting the 'origin' to a wrong (i.e. where push goes) place?

Previous: Robert DaileyNext: Robert Dailey
Message 5 of 25 in “Relative submodule URLs”
  1. Robert DaileyAug 18, 2014
  2. Jonathan NiederAug 18, 2014
  3. Heiko VoigtAug 19, 2014
  4. Robert DaileyAug 19, 2014
  5. Junio C HamanoAug 19, 2014
  6. Robert DaileyAug 19, 2014
  7. Junio C HamanoAug 19, 2014
  8. Robert DaileyAug 19, 2014
  9. Heiko VoigtAug 19, 2014
  10. Robert DaileyAug 19, 2014
  11. Heiko VoigtAug 19, 2014
  12. Robert DaileyAug 20, 2014
  13. Heiko VoigtAug 21, 2014
  14. Robert DaileyAug 19, 2014
  15. Marc BranchaudAug 22, 2014
  16. Heiko VoigtAug 24, 2014
  17. Robert DaileyAug 25, 2014
  18. Robert DaileyAug 25, 2014
  19. Heiko VoigtAug 26, 2014
  20. Robert DaileyAug 26, 2014
  21. Heiko VoigtAug 26, 2014
  22. Robert DaileyAug 25, 2014
  23. Marc BranchaudAug 28, 2014
  24. Heiko VoigtAug 28, 2014
  25. Marc BranchaudAug 29, 2014

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.