Re: [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number>
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Mar 3, 2014, 10:12 UTC
- Message-ID
- <vpqvbvvegli.fsf@anie.imag.fr>
- In-Reply-To
- <CACsJy8CPhTQxpnY70PxD9zFSipaJCTQPBsmReD8E9tmEgsvTRg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 12 quoted lines
> On Mon, Mar 3, 2014 at 4:37 PM, Matthieu Moy
>
>> This would actually be a feature for me: I often want to rebase "recent
>> enough" history, and when my @{upstream} isn't well positionned, I
>> randomly type HEAD~N without remembering what N should be. When N is too
>> small, the rebase doesn't reach the interesting commit, and when N is
>> too big, it reaches a merge commit and I get a bunch of commits I'm not
>> allowed to edit in my todo-list. Then I have to abort the commit
>> manually. With -N failing on merge commits, the rebase would abort
>> itself automatically.
>
> would "git rebase -i --fork-point" be what you need instead?I don't think so. My use case is when I did a manual merge, so @{upstream} is helpless or even not positionned. There is for sure an accurate command (remember the branch I just merged and put it on the command-line), but my fingers prefer typing quick and dirty commands and hope I won't get too many trial and error cycles ;-).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/