Re: Please discuss: what "git push" should do when you do not say what to push?
- From
Nathan Gray <n8gray@n8gray.org>
- Date
- Mar 20, 2012, 07:13 UTC
- Message-ID
- <CA+7g9JzfFg9U9qiWtjX5OgA5c=dS1bPWaXqMbmxAtzaQeKRF8Q@mail.gmail.com>
- In-Reply-To
- <7v7gyjersg.fsf@alter.siamese.dyndns.org>
On Fri, Mar 16, 2012 at 10:10 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 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.
+1 for 'upstream'. "Push" should mirror "pull" by the principle of least surprise.
Cheers, -Nathan
-- http://n8gray.org