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

Re: Pushing to a non-bare repository

From
Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Date
Feb 3, 2007, 09:46 UTC
Message-ID
<45C459DD.8080201@fs.ei.tum.de>
In-Reply-To
<7vfy9ndiqp.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 8 quoted lines
>> This keeps coming up as I introduce people to git. In previous
>> discussions, the conclusion often seems to be that users don't really
>> know what they want the semantics to be.
> 
> I do not think that was the conclusion.  My suggestion to you
> would be to stop thinking as if push is a converse of pull
> (because it is not; push is a counterpart of fetch), and leave
> push as is.
However, your suggestion does not help people who don't know better.  Pushing into the HEAD branch of another repo breaks stuff there.  Badly.  This should be prevented, really.
I don't say "Push needs to behave like a fast forward pull", because that's wrong.  You can't just change the workdir, possibly due to permissions problems.  But push has to abort if you try to forward HEAD on the remote, except if it is bare, of course.
cheers
  simon
-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Pushing to a non-bare repository”
  1. Steven GrimmFeb 3, 2007
  2. Junio C HamanoFeb 3, 2007
  3. Simon 'corecode' SchubertFeb 3, 2007
  4. Junio C HamanoFeb 3, 2007
  5. Linus TorvaldsFeb 3, 2007
  6. Junio C HamanoFeb 3, 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.