All of lore.kernel.org
 help / color / mirror / 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 19:47:38 +0400	[thread overview]
Message-ID: <87fvg23yhx.fsf@osv.gnss.ru> (raw)
In-Reply-To: <20140908140758.GI1066@thunk.org> (Theodore Ts'o's message of "Mon, 8 Sep 2014 10:07:58 -0400")

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

> On Mon, Sep 08, 2014 at 05:52:44PM +0400, Sergey Organov wrote:
>> 
>> I didn't intend to make topic branch from the very beginning, and
>> already made a commit or two on the remote tracking branch bofore I
>> realized I'd better use topic branch. It'd create no problem as far as I
>> can see, provided vanilla "git rebase" has "sane" defaults. That said,
>> I've already been once pointed to by Junio that my definition of "sane"
>> doesn't take into account workflows of others, so now I try to be
>> carefull calling vanilla "git rebase" names.
>
> Right, so what I typically in that situation is the following:
>
> <on the master branch>
> <hack hack hack>
> git commit
> <hack hack hack>
> git commit
> <oops, I should have created a topic branch>
> git checkout -b topic-branch
> git branch -f master origin/msater
>
> This resets the master branch to only have what is in the upstream
> commit.

But that's *exactly* what lead me to the problem! Here is relevant part
of my script:

git checkout -b topic
git branch --force master origin_master
git branch -u master

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!

-- Sergey.

P.S. Nice 'lgt' alias, BTW. I simply use:

$ git help hist
git hist' is aliased to `log --oneline --graph --decorate'

stolen somewhere.

  reply	other threads:[~2014-09-08 15:47 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 [this message]
2014-09-08 17:32         ` Theodore Ts'o
2014-09-08 19:49           ` Sergey Organov
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

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

  git send-email \
    --in-reply-to=87fvg23yhx.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.