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

Re: git push

From
Jeff King <peff@peff.net>
Date
Feb 25, 2009, 09:02 UTC
Message-ID
<20090225090230.GA15919@coredump.intra.peff.net>
In-Reply-To
<7v4oyjc64z.fsf@gitster.siamese.dyndns.org>
On Tue, Feb 24, 2009 at 11:44:44PM -0800, Junio C Hamano wrote:
Show 6 quoted lines
> > Presumably the obvious is that it might be confusing to existing
> > users?  Perhaps, but it doesn't cause any damage.  It's moving to a
> > 'safer' default.
> 
> No, it is not merely confusing but is outright dangerous to people who
> expect the "matching refs" behaviour.  It is not safer at all.

I think this is a very good reason not to change the default "push" behavior.

Show 9 quoted lines
> And this is not about punishing.  It is about getting into a different
> mindset.  Unlike CVS/SVN, committing and publishing can be made into
> different phases with git, and not pushing too early allows you produce a
> lot better results.  "I want to push only this branch" is often (not
> always, but "often" stands with strong correlation) a sign that other
> things are not ready, and by definition you couldn't have thought through
> interactions between what you _think_ is ready (i.e. the current branch)
> and the other ones that are not ready.  In other words, it is about
> encouraging people to think things through before publishing.

But I don't buy this at all. It is totally dependent on workflow and how you use branches. That is, the "readiness" of two branches may be totally unrelated. One may be a short-term branch for today's work, and the other may be a long-running branch that you have made a WIP commit on. You may even have that WIP commit sitting there for days.

When you think about "is my current branch ready to push?" there is no reason for you to think of that other long-running branch that you haven't seen for days.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 17 in “git push”
  1. John TapsellFeb 25, 2009
  2. Jeff KingFeb 25, 2009
  3. Junio C HamanoFeb 25, 2009
  4. John TapsellFeb 25, 2009
  5. Junio C HamanoFeb 25, 2009
  6. Jeff KingFeb 25, 2009
  7. Junio C HamanoFeb 25, 2009
  8. Jeff KingFeb 25, 2009
  9. John TapsellFeb 25, 2009
  10. Junio C HamanoFeb 25, 2009
  11. John TapsellFeb 25, 2009
  12. Jay SoffianFeb 25, 2009
  13. Junio C HamanoFeb 25, 2009
  14. Finn Arne GangstadFeb 25, 2009
  15. Andreas EricssonMar 5, 2009
  16. John TapsellMar 5, 2009
  17. Finn Arne GangstadMar 5, 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.