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

Re: Managing websites with git

From
Jason Riedy <jason@acm.org>
Date
Dec 2, 2008, 15:55 UTC
Message-ID
<87vdu2po5l.fsf@sparse.dyndns.org>
In-Reply-To
<20081202011154.GA6390@coredump.intra.peff.net>
And Jeff King writes:
> To clarify: one should not push to the _current branch_ of a
> non-bare repo...

Ah, ok, thanks! Issuing a warning makes sense. I'm not sure if denying such a push by default does...

> Doing git push $remote HEAD:branch-that-is-checked-out
> has _never_ worked without further action on $remote. Now we're warning
> about it.

It works just fine. I suspect we have different definitions of "works".

To me, that push updates the branch's reference. The working copy and index now may be out of sync, but neither the working copy nor the index is the branch's reference. Trying to commit from the index correctly refuses. The warning is a nice reminder, but I don't see why this should be denied by default. The user (me) hasn't lost anything, and every tool does what it is supposed to do (from my point of view).

But I'm one of those people who has always liked the three levels of git. And I use them all.

(And in context: I used to update the IEEE754 group's web site by a git push to the checked-out master, with a hook to reset everything. Worked just fine (and very quickly) until they shut off shell access. There was no need for an extra branch on the server side.)

> If you have other specific complaints about new git behavior,
> I'm sure the list would be happy to hear about it.

I'll try to find time when I encounter another. I'm pretty sure that switching to denying pushes to checked-out branches is the first one that *really* will make me change how I work.

Jason
Previous: Jeff KingNext: Jeff King
Message 6 of 10 in “Managing websites with git”
  1. Felix AndersenNov 30, 2008
  2. David BrysonNov 30, 2008
  3. Jeff KingNov 30, 2008
  4. Jason RiedyDec 2, 2008
  5. Jeff KingDec 2, 2008
  6. Jason RiedyDec 2, 2008
  7. Jeff KingDec 2, 2008
  8. Junio C HamanoDec 2, 2008
  9. Leo RazoumovDec 2, 2008
  10. Todd A. JacobsJan 3, 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.