git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylvain Rabot <sylvain@abstraction.fr>
To: git <git@vger.kernel.org>
Subject: Re: Need some help with git rebase
Date: Thu, 31 Dec 2009 10:02:12 +0100	[thread overview]
Message-ID: <7fce93be0912310102x53755120o31e42c4a7a92a709@mail.gmail.com> (raw)
In-Reply-To: <CB5B49CA-0C66-4384-9B47-3675E517E203@wincent.com>

On Wed, Dec 30, 2009 at 23:46, Wincent Colaiuta <win@wincent.com> wrote:
>
> Look at the "git-rebase" man page, particularly the order of the arguments, what they mean, and the usage examples of "--onto":
>
>  $ git rebase --onto 12.72.1 master feature
>
> Means, "replay these changes on top of 12.72.1", where "these changes" refers to commits on branch "feature" with upstream "master", which is what "git rebase" did for you.
>
> If you actually want the "feature" branch to continue pointing at the old feature branch rather than your newly rebased one, you could just look up the old SHA1 for it and update it with:
>
>  $ git branch -f feature abcd1234
>
> Where "abcd1234" is the hash of the old "feature" HEAD.
>
> But I don't really know why you'd want to do that. The purpose of "git rebase" isn't to copy or cherry-pick commits from one branch onto another, but to actually _move_ (or transplant, or replay, if you prefer) those commits.
>
> Maybe I misunderstood your intentions though.
>
> Cheers,
> Wincent
>

In fact I want to backport the commits of the feature branch into 12.72.1.
I used git rebase because the drawings of the man page looked like
that I wanted to do and it does except for the part it resets the head
of my feature branch.

But the good behavior would be to cherry pick each commit of the
feature branch and apply them into 12.72.1, right ?

Thanks for your answer.

Regards.

--
Sylvain

  reply	other threads:[~2009-12-31  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28 13:33 Need some help with git rebase Sylvain RABOT
2009-12-30 22:24 ` Sylvain Rabot
2009-12-30 22:46   ` Wincent Colaiuta
2009-12-31  9:02     ` Sylvain Rabot [this message]
2009-12-31  9:32       ` Peter Baumann
     [not found]     ` <7fce93be0912301502r77152c52sbccf762fb6c44610@mail.gmail.com>
2009-12-31 11:06       ` Wincent Colaiuta
2009-12-31  5:01   ` Tay Ray Chuan

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=7fce93be0912310102x53755120o31e42c4a7a92a709@mail.gmail.com \
    --to=sylvain@abstraction.fr \
    --cc=git@vger.kernel.org \
    /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).