Thread (1 message) 1 message, 1 author, 2016-06-15

Re: push.default: current vs upstream

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:27

Matthieu Moy [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
quoted
Before saying "again", perhaps we should read and think about what the
other side said.  I think [*1*] raises a good point.
quoted
*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:
quoted
quoted
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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help