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

Re: receive.denyCurrentBranch

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 8, 2009, 22:03 UTC
Message-ID
<m3eiy8vb7t.fsf@localhost.localdomain>
In-Reply-To
<76718490902080950r798ca02es4e560da35e499046@mail.gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 8 quoted lines
> What I especially like about Mercurial here is that pushing from A is
> perfectly symetrical to pulling from B.
> 
> With git, cloning sets things up to fetch into a tracking branch,
> but then the push is not symetric to the fetch. That makes sense if
> you're cloning from a bare repo, but I think leads to confusion for
> new users when they clone a non-bare repo they wish to later push
> into. I dunno, I guess we'll see if the new message helps any.

Push _is_ symmetric to fetch; it is not symmetric to pull, and it cannot be. BTW. Mercurial's pull is equivalent to Git's fetch.

That is of course provided that you have the same refspec(s) for push and for fetch. And up to the point: push needs to be via authenticated channel, for obvious reasons.

The fact that default setup is not symmetric reflect the fact that in most cases the situation is not symmetric: you fetch from other remote repository into separate remotes layout, you push into your own public bare publishing repository set up in mirroring mode.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jay Soffian
Message 15 of 15 in “receive.denyCurrentBranch”
  1. George SpelvinFeb 8, 2009
  2. Junio C HamanoFeb 8, 2009
  3. Johannes SchindelinFeb 8, 2009
  4. Jay SoffianFeb 8, 2009
  5. Johannes SchindelinFeb 8, 2009
  6. Jay SoffianFeb 8, 2009
  7. Jay SoffianFeb 8, 2009
  8. Johannes SchindelinFeb 8, 2009
  9. Junio C HamanoFeb 9, 2009
  10. Jay SoffianFeb 9, 2009
  11. Theodore TsoFeb 9, 2009
  12. Johannes SchindelinFeb 9, 2009
  13. Jay SoffianFeb 9, 2009
  14. Jay SoffianFeb 9, 2009
  15. Jakub NarebskiFeb 8, 2009

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.