git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Sergey Organov <sorganov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git rebase: yet another newbie quest.
Date: Fri, 5 Sep 2014 23:13:36 +0100	[thread overview]
Message-ID: <20140905221336.GB701@serenity.lan> (raw)
In-Reply-To: <87a96ecqe9.fsf@osv.gnss.ru>

On Fri, Sep 05, 2014 at 02:28:46PM +0400, Sergey Organov wrote:
...
> # Then I realize I need more changes and it gets complex enough to
> # warrant a topic branch. I create the 'topic' branch that will track
> # 'master' branch and reset 'master' back to its origin (remote
> # origin/master in original scenario).
> 
> git checkout -b topic
> git branch --force master origin_master

This line is the problem, because the purpose of the `--fork-point`
argument to `git rebase` is designed to help people recover from
upstream rebases, which is essentially what you create here.  So when
rebase calculates the local changes it realises (from the reflog) that
the state of master before this command was before you created the
branch, so only commits after it should be picked.

For the case when the upstream of a branch is remote, this is normally
what you want.

  parent reply	other threads:[~2014-09-05 22:22 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
2014-09-05 22:13 ` John Keeping [this message]
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=20140905221336.GB701@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=sorganov@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.
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).