Re: push.default: current vs upstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> Before saying "again", perhaps we should read and think about what the
>> other side said.  I think [*1*] raises a good point.
>
>> *1* http://thread.gmane.org/gmane.comp.version-control.git/194175/focus=194470
>
> I think this message precisely supports my claim: we focus the
> discussion on "git push", without thinking on the big picture "git pull"
> AND "git push". The message you point to does not talk at all about "git
> pull".

I do not think so; that "name" argument is about this part from Peff's
message, to which it is a response:

>> > my two concerns is that this:
>> >
>> >   $ git clone ...
>> >   $ git checkout -b topic origin/master
>> >   $ hack hack hack
>> >   $ git push
>> >
>> > will try to implicitly fast-forward merge your commits onto master.
>> 
>> And the reason why it is surprising to the beginners is?  Because "topic"
>> and "master" (of "origin/master") are not the same name?
>
> Sort of. It is more because "upstream" is an overloaded concept. Perhaps
> you created the branch from origin/master because you wanted to say
> "this is where my topic is based, and when I 'rebase -i' later, I want
> it to be considered the baseline". Or perhaps you meant to say "I am
> going to work on origin's master branch, but I would prefer to call it
> 'topic' here".

If you re-read it, it should be clear that this is _also_ about "git pull";
"I am going to work on origin's master branch" is about pushing the result
back there.

In the former case, you may want to push it to 'topic' to work further
with your collaborators.  In the latter case, you would want to push it
back to 'master', even though you are calling it locally 'topic' for some
sick reason (read: because you can).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]