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

Re: Adding push configuration to .git/config

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 22, 2007, 01:48 UTC
Message-ID
<7vabp79hjt.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071121105517.GA11875@denkbrett.schottelius.org>

Nico -telmich- Schottelius <nico-linux-git@schottelius.org> writes:

Show 10 quoted lines
> Nice would be
>
> [branch "master"]
>    remote-push          = origin
>    remote-push-merge    = another_branch
>
> And thus perhaps also changing the existing specs:
>
>    remote = ... to remote-fetch = ...
>    merge = ... to remote-fetch-merge = 

I do not think doing this is worth it, not because I think a single branch.$name.remote should be good enough for everybody, but because once you need a separate remote each for fetching and pushing, there is no reason to say one per direction is enough.

An alternative could be to split [remote "name"] url into two variants, fetch-url and push-url. While fetching by default from two places without telling from which one does not make any sense, pushing by default to two different places is quite a normal thing to do, and we already do support more than one url entries in [remote "name"] section used for pushing.

If we were to do this, it might also make sense to rename the word 'origin' we use for the default remote name to 'default' or something. People with shared repository workflow would fetch from one repository and push back to the same repository, so the distinction would not matter, but for others who need something like you suggest, the default repository for fetching and pushing are different, and while you may still consider where you fetch from your 'origin', where you push into is not your 'origin' anymore.

Previous: Steffen ProhaskaNext: Steffen Prohaska
Message 3 of 16 in “Adding push configuration to .git/config”
  1. Nico -telmich- SchotteliusNov 21, 2007
  2. Steffen ProhaskaNov 21, 2007
  3. Junio C HamanoNov 22, 2007
  4. Steffen ProhaskaNov 22, 2007
  5. Andreas EricssonNov 22, 2007
  6. Junio C HamanoNov 22, 2007
  7. Junio C HamanoNov 22, 2007
  8. Steffen ProhaskaNov 22, 2007
  9. Johannes SchindelinNov 22, 2007
  10. Junio C HamanoNov 22, 2007
  11. Andreas EricssonNov 22, 2007
  12. Steffen ProhaskaNov 22, 2007
  13. Nico -telmich- SchotteliusNov 28, 2007
  14. Johannes SchindelinNov 28, 2007
  15. Junio C HamanoNov 29, 2007
  16. Jakub NarebskiNov 30, 2007

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.