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
Kevin Ballard <kevin@sb.org>
Date
Mar 19, 2012, 18:57 UTC
Message-ID
<87BE88BA-2827-4EDC-99BF-94026E604AB0@sb.org>
In-Reply-To
<7v7gyjersg.fsf@alter.siamese.dyndns.org>

I would love to see the default changed to 'upstream'. I've wanted this ever since the push.default=tracking value was introduced. When introducing new users to git, one of the first things I always tell them is to run

    git config --global push.default tracking

because it's far easier to explain how that behavior works than it is to explain how the 'matching' behavior works, and it more closely aligns with the way people (in my experience) typically use git.

-Kevin
On Mar 16, 2012, at 10:10 PM, Junio C Hamano wrote:
Show 47 quoted lines
> There is a proposal to change the default behaviour of 'git push' on the
> Git mailing list. The goal of this message is to encourage you to discuss
> it before it happens (or the change is aborted, depending on the outcome
> of the discussion).
> 
> In the current setting (i.e. push.default=matching), 'git push' without
> argument will push all branches that exist locally and remotely with the
> same name. This is usually appropriate when a developer pushes to his own
> public repository, but may be confusing if not dangerous when using a
> shared repository. The proposal is to change the default to 'upstream',
> i.e. push only the current branch, and push it to the branch 'git pull'
> would pull from. Another candidate is 'current'; this pushes only the
> current branch to the remote branch of the same name.
> 
> For more details on the behavior of Git with these values, read the
> documentation about 'push.default' in 'man git-config'
> (http://schacon.github.com/git/git-config.html).
> 
> You may be negatively affected when such a change happens if you do not
> see anything in the output from 'git config push.default' and if you rely
> on the default that pushes all your matching branches. On the other hand,
> you may want to see the default behaviour to change, especially if you are
> using shared repositories. In either case, please join the discussion to
> give us more data point and help us decide the future of Git. Also, if
> you think your friends and colleagues will be affected by this change,
> either positively or negatively, please tell them about this discussion.
> 
> What has been discussed so far can be seen in this thread:
> 
>    http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694
> 
> Previous relevant discussions include:
> 
>    http://thread.gmane.org/gmane.comp.version-control.git/123350/focus=123541
>    http://thread.gmane.org/gmane.comp.version-control.git/166743
> 
> To join the discussion, send your messages to:
> 
>    git@vger.kernel.org
> 
> The list accepts messages from non-subscribers, and you do not have to ask
> "please Cc me, I am not subscribed", as it's customary to Cc: posters when
> replying on this list.
> --
> 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
Previous: Peter KreftingNext: Antony Male
Message 34 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.