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

Re: Please discuss: what "git push" should do when you do not say what to push?

From
Andreas Ericsson <ae@op5.se>
Date
Mar 20, 2012, 10:00 UTC
Message-ID
<4F685559.8040402@op5.se>
In-Reply-To
<7v1uoo9pyo.fsf@alter.siamese.dyndns.org>

I just realized I've had the proposed behaviour for "upstream" backwards all along. I thought "upstream" was meant to do what "matching" does today.

I'd like to change my vote to "upstream" instead, although I think the name for it is truly horrible. Perhaps that's just me though, since we're using "upstream" as a remotename for repositories we get from afar but work on internally as well.

On 03/19/2012 11:38 PM, Junio C Hamano wrote:
Show 46 quoted lines
> demerphq<demerphq@gmail.com>  writes:
> 
>> ... I thought the worse case here is
>> minor inconvenience, not data loss or anything else that is obviously
>> harmful.
> 
> If your definition of harm is limited to data loss then we wouldn't be
> talking about updating the default from matching to current or upstream.
> "If your push failed, pushed what you did not mean to, or did not push
> what you meant to, you would correct the mistake" applies equally to a new
> person who expected "current" (or "upstream") and got "matching", or an old
> person who expected "matching" and got "current".
> 
> The purpose of the default change is to reduce surprises to people who
> haven't yet learned Git too well.  And for them,
> 
>      I was on master, I said 'git push' without saying what to push to
>      where, and it resulted in master updated at the central repository.
> 
> is the least surprising outcome.  Note that a learnt Git user would not
> express what he did this way; he will say 'I was on *my* master' and
> 'the master at the central repository was updated with *my* master', but
> the change of the default is to help those who haven't even learned that
> your branches and branches at the central server are not always connected.
> 
> Choice of "upstream" is more convenient for users who learned Git a bit
> more and knows the distinction between branches you have and branches the
> central server has.  For them, "I was on my 'topic' branch, that was
> forked from the 'master' branch at the central repository. I said 'git
> push', and I updated the 'master' over there with my 'topic'", is also not
> surprising, but it is more advanced audience than those helped by the
> default setting to push 'current'.
> 
> In either way, once people learn sufficiently to the point that they can
> choose their own default that suit them, there is no need for handholding.
> They won't be surprised.
> 
> But except for one case you should *not* forget about.
> 
> The ones who get pulled the old default under their feet while not paying
> too much attention to this discussion. The change will hit them with a
> surprise, and that is what I am trying to avoid here.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Junio C HamanoNext: Andrew Sayers
Message 12 of 43 in “Please discuss: what "git push" should do when you do not say what to push?”
  1. Junio C HamanoMar 17, 2012
  2. Junio C HamanoMar 17, 2012
  3. Andrew SayersMar 17, 2012
  4. Junio C HamanoMar 18, 2012
  5. Ævar Arnfjörð BjarmasonMar 18, 2012
  6. Junio C HamanoMar 19, 2012
  7. Sebastien DoucheMar 19, 2012
  8. Andrew SayersMar 19, 2012
  9. Junio C HamanoMar 19, 2012
  10. demerphqMar 19, 2012
  11. Junio C HamanoMar 19, 2012
  12. Andreas EricssonMar 20, 2012
  13. Andrew SayersMar 19, 2012
  14. Junio C HamanoMar 19, 2012
  15. Andrew SayersMar 20, 2012
  16. Junio C HamanoMar 20, 2012
  17. Andrew SayersMar 20, 2012
  18. Junio C HamanoMar 21, 2012
  19. Martin LanghoffMar 20, 2012
  20. Junio C HamanoMar 20, 2012
  21. Martin LanghoffMar 20, 2012
  22. Jakub NarebskiMar 20, 2012
  23. Summary of discussion on "git push" default changeJunio C Hamano, Mar 21, 2012
  24. Matthieu MoyMar 21, 2012
  25. Joey HessMar 17, 2012
  26. Junio C HamanoMar 19, 2012
  27. fREW SchmidtMar 17, 2012
  28. H. Peter AnvinMar 18, 2012
  29. Marcus D. HanwellMar 18, 2012
  30. Sebastian SchuberthMar 18, 2012
  31. Peter KreftingMar 19, 2012
  32. Letting remote repositories override local configurationJonathan Nieder, Mar 19, 2012
  33. Peter KreftingMar 19, 2012
  34. Kevin BallardMar 19, 2012
  35. Antony MaleMar 20, 2012
  36. Jakub NarebskiMar 20, 2012
  37. Antony MaleMar 20, 2012
  38. Nathan GrayMar 20, 2012
  39. Ben TebulinMar 20, 2012
  40. Ben TebulinMar 20, 2012
  41. Ben TebulinMar 20, 2012
  42. Ben TebulinMar 20, 2012
  43. Filipe FernandesMar 20, 2012

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.