git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: git@vger.kernel.org
Subject: Re: git rebase: yet another newbie quest.
Date: Mon, 08 Sep 2014 23:49:25 +0400	[thread overview]
Message-ID: <87egvlzyd6.fsf@osv.gnss.ru> (raw)
In-Reply-To: <20140908173251.GA24855@thunk.org> (Theodore Ts'o's message of "Mon, 8 Sep 2014 13:32:51 -0400")

Theodore Ts'o <tytso@mit.edu> writes:

> On Mon, Sep 08, 2014 at 07:47:38PM +0400, Sergey Organov wrote:
>> 
>> except that I wanted to configure upstream as well for the topic-branch,
>> that looks like pretty legit desire. If I didn't, I'd need to specify
>> upstream explicitly in the "git rebase", and I'd not notice the problem
>> at all, as the actual problem is that "git rebase" and "git rebase
>> <upstream>" work differently!
>
> Right, so I never do that.  I have master track origin/master, where
> it automagically does the right thing, but I'm not even sure I can
> articulate what it *means* to have topic also track origin/master.

You got it somewhat wrong. I intended 'topic' to track 'master', not
'origin/master'.

> I just don't have a mental model for it, and so it falls in the category
> of "it's too complicated for my simple brain to figure out".

I thought it's rather common for one local branch to track another in
the git world. At least all machinery is there, and I don't see how
tracking local branch is different from tracking remote branch,
fundamentally.

> So I just do "git rebase master", and I would never even *consider*
> doing a "git pull --rebase".  I'll do a "git fetch", and then look at
> what just landed, and and then checkout master, update it to
> origin/master, and then run the regression tests to make sure what
> just came in from outside actually was *sane*, and only then would I
> do a "git checkout topic; git rebase master", and then re-run the
> regression tests a third time.

Yeah, and I simply wanted to shorten it to "git checkout topic; git
rebase", by making git remember I want to rebase w.r.t. 'master' by
default. 

> Otherwise, how would I know whether the regression came in from
> origin/master, or from my topic branch, or from the result of rebasing
> the topic branch on top of origin/master?

As far as I can see, what I did is almost exactly what you do, except I
didn't want to tell "master" every time I want to rebase 'topic' branch.
Configuring tracking branch and saying just "git rebase" when you are on
the branch seems to be logical, and there doesn't seem to be anything
wrong with it (except strange git default behavior), or does it?

> And of course, this goes back to my observation that I don't rebase my
> topic branchs all that often anyway, just because the moment you do
> the rebase, you've invalidated all of the testing that you've done to
> date.  In fact, some upstreams will tell explicitly tell you to never
> rebase a topic branch before you ask them to pull it in, unless you
> need to handle some non-trivial merge conflict.

That's good advice indeed, but it's unrelated to the issue at hand, as you
still rebase, sooner or later.

-- 
Sergey.

  reply	other threads:[~2014-09-08 19:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 10:28 git rebase: yet another newbie quest Sergey Organov
2014-09-05 15:41 ` Theodore Ts'o
2014-09-08 13:52   ` Sergey Organov
2014-09-08 14:07     ` Theodore Ts'o
2014-09-08 15:47       ` Sergey Organov
2014-09-08 17:32         ` Theodore Ts'o
2014-09-08 19:49           ` Sergey Organov [this message]
2014-09-05 22:13 ` John Keeping
2014-09-08 13:51   ` Sergey Organov

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87egvlzyd6.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).