[git-users] push origin master/branch

2012-04-13 Thread THUFIR HAWAT
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.

Why is it designed so that you must specify the branch with checkout but 
again specify the branch with push -- seems redundant.  I'm sure to be 
corrected :)

The git tutorial:

http://jk.gs/gittutorial.html

doesn't mention this in a way which I saw, they just switch back to the 
master and drop the branch as redundant, ignoring the possibility of 
pushing that branch.  For me, this was an oversight.



thanks,

Thufir

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/3x1Z5v-KNkEJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



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

2012-04-13 Thread PJ Weisberg
On Fri, Apr 13, 2012 at 4:47 PM, THUFIR HAWAT hawat.thu...@gmail.com 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,
g...@vger.kernel.org.)

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.

-PJ

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

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.