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

From: Sebastian Schuberth <[email-masked]>
Date: Sun, 18 Mar 2012 17:52:51 +0100

On 17.03.2012 19:43, fREW Schmidt wrote:

> its tracking branch only.  That leaves very little room for surprises
> and mistakes (the one exception being git push after git checkout -b
> new-branch origin/master.)

That's exactly why I'd prefer "current" instead of "upstream" as the 
default behavior, as it even causes no surprises in the checkout -b 
case, IMHO.

I believe the most common workflow for the large number of git users who 
are no integrators / maintainers is to start a topic branch from master 
and then work on that topic branch until it gets merged. In order to 
test the topic branch on other platforms or make it available to others, 
it's a common operation to push the topic branch to a branch of the same 
name instead of the tracking branch. That's why I believe "current" is 
both the setting that matches the workflow of most git users and is the 
setting that really causes the least surprises (not least because it's 
straight forward what the name of the pushed branch would be, as it's 
the current branch's name; if you don't know the upstream branch's name 
out of your head, you'd have to look it up to know).

-- 
Sebastian Schuberth