git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Sajine <euguess@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>, Eugene Sajine <euguess@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Re: Why the default action for pull is merge, but not rebase?
Date: Wed, 27 Oct 2010 13:58:45 -0400	[thread overview]
Message-ID: <AANLkTinDaYr8fsZiit4VYH-vptO7LtwRggkFGLKMnAhY@mail.gmail.com> (raw)
In-Reply-To: <0016e645b8c87a160804939cdc5e@google.com>

On Wed, Oct 27, 2010 at 1:50 PM,  <Euguess@gmail.com> wrote:
> On Oct 27, 2010 1:36pm, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Eugene Sajine wrote:
>>
>>
>>
>> > Thanks for prompt answer. But let me clarify:
>>
>> >
>>
>> > When you do pull git performs:
>>
>> >
>>
>> > fetch of the remote branch to the FETCH_HEAD
>>
>> > and then merge of FETCH_HEAD into the local branch
>>
>> >
>>
>> > What I'm saying is that your local branch should be rebased on top of
>>
>> > FETCH_HEAD instead
>>
>> >
>>
>> > In this case there is no such thing as "often rebased public branch".
>>
>>
>>
>> Ah, but there is.
>>
>>
>>
>> Imagine you are Junio and just received a pull request from Pat.
>>
>> Then you might try:
>>
>>
>>
>>  $ git pull pat for-junio
>>
>>
>>
>> which will do all the fetching and merging magic that "git pull"
>>
>> is known for.  Now if pat's for-junio branch is based on the tip
>>
>> of your current branch, this will be a fast-forward and it doesn't
>>
>> matter whether you merge or rebase.  But what if there are some
>>
>> intervening commits?
>>
>>
>>
>>  $ git pull eric for-junio
>>
>>  $ git pull pat for-junio
>>
>>
>>
>> If this pull were the rebasing kind, the result would be for Eric's
>>
>> commits to be rewritten based on Pat's.
>>
>
> Oh, I see. In this case you're right.
> My scenario is probably making more sense for the "centralized approach",
> where the exchange goes via some blessed bare repo on the server.
> So, I just have to run git pull --rebase to get my scenario working, right?
>
>
> Thanks!
> Eugene

Actually it seems that it will not work as i would expect...
git pull --rebase is going to rebase the upstream on top of my local
branch, right? Is this really intended behavior? Shouldn't it rebase
my local on top of the upstream instead?

Thanks,
Eugene

  parent reply	other threads:[~2010-10-27 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 16:46 Why the default action for pull is merge, but not rebase? Eugene Sajine
2010-10-27 16:57 ` Jonathan Nieder
2010-10-27 17:21   ` Eugene Sajine
2010-10-27 17:36     ` Jonathan Nieder
     [not found]       ` <0016e645b8c87a160804939cdc5e@google.com>
2010-10-27 17:58         ` Eugene Sajine [this message]
2010-10-27 18:05         ` Jonathan Nieder
2010-10-27 19:30           ` Eric Raible
2010-10-28  2:53             ` Joshua Jensen
2010-10-28  3:27               ` Kevin Ballard
2010-10-28  6:39                 ` Eric Raible
2010-10-28  7:13                   ` Kevin Ballard
2010-10-28  7:27             ` Stefan Haller
2010-10-28  6:17     ` Björn Steinbrink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinDaYr8fsZiit4VYH-vptO7LtwRggkFGLKMnAhY@mail.gmail.com \
    --to=euguess@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).