Google Groups

Re: [git-users] push origin master/branch

Peter J Weisberg Apr 13, 2012 8:44 PM
Posted in group: Git for human beings
On Fri, Apr 13, 2012 at 4:47 PM, THUFIR HAWAT <> wrote:
> I find this terminology confusing.  Doesn't the master contain the branch?
> So, why can't I push a branch against the master?  If I've checked out
> branch x, the push will be applied to that branch, I would expect.

You're not the only one who expects that, which is why the default
will be changing in the very near future so that it behaves that way.
(The issue has been discussed recently on the main git mailing list,

For now, the default meaning of 'git push' is to push all branches
that exist both locally and on the remote.  If you want it to instead
push the current branch to a branch of the same name on the remote,
run "git config --global push.default current".


Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.