All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Show an example of deleting commits with git-rebase.
Date: Wed, 07 Feb 2007 11:25:41 +0100	[thread overview]
Message-ID: <eqc9c7$9lr$1@sea.gmane.org> (raw)
In-Reply-To: 20070207101624.GC20290@mellanox.co.il

Michael S. Tsirkin wrote:
> Shawn O. Pearce <spearce@spearce.org> wrote:

>> Subject: [PATCH] Show an example of deleting commits with git-rebase.
>> 
>> +A range of commits could also be removed with rebase.  If we have
>> +the following situation:
>> +
>> +------------
>> +    E---F---G---H---I---J  topicA
>> +------------
>> +
>> +then the command
>> +
>> +    git-rebase --onto topicA~5 topicA~2 topicA
>> +
>> +would result in the removal of commits F and G:
>> +
>> +------------
>> +    E---H'---I'---J'  topicA
>> +------------
>> +
>> +This is useful if F and G were flawed in some way, or should not be
>> +part of topicA.  Note that the argument to --onto and the <upstream>
>> +parameter can be any valid commit-ish.
>> +
> 
> Good clarification, a couple of comments:
> - The use of <branch> is more confusing than useful in this case.
>   You can always just do
>       git reset --hard topicA
>       git rebase --onto topicA~5 topicA~2
>   instead, correct?

I disagree. In my opinion using of <branch> makes it more clear: which
branch we are rebasing, and range of commits moved.
 
> - The use of ~ notation here is also more scary than clarifying.
>    git rebase --onto F H
>   will be clearer I think.

I agree.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  reply	other threads:[~2007-02-07 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05 20:21 [PATCH] Show an example of deleting commits with git-rebase Shawn O. Pearce
2007-02-07 10:16 ` Michael S. Tsirkin
2007-02-07 10:25   ` Jakub Narebski [this message]
2007-02-07 12:11   ` Andy Parkins

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='eqc9c7$9lr$1@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --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 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.