Re: [PATCH] Show an example of deleting commits with git-rebase.

From: Jakub Narebski <jnareb@gmail.com>
Date: 2007-02-07 21:25:41
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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Feb 07 21:25:26 2007

This archive was generated by hypermail 2.1.8 : 2007-02-07 21:27:05 EST