Subject: Re: [RFC PATCH] rebase: implement --rewind

From: Phillip Wood <[email-masked]>
Date: Tue, 11 Apr 2023 11:06:04 +0100

On 07/04/2023 08:00, Oswald Buddenhagen wrote:

> at this point i'm actually thinking in the opposite direction: introduce 
> commands that let me move by a few commits without even opening the todo 
> editor (where have i seen that already? jj?).

When I'm working on a patch series I use this approach a lot with a "git 
rewrite" script I have. To amend a commit I run "git rewrite amend 
<commit>" and it will start a rebase or rewind the current one. It will 
also take a file, line number pair and use "git diff" to map that line 
onto HEAD and then "git blame" to work out which commit to amend so you 
can run it from your editor and say "amend the commit that added this 
line" which is a great time saver. I'd love to a command like that 
upstream in git but I don't think it covers all the cases that "rebase 
--rewind" does such as dscho rebasing git-for-windows.

Best Wishes

Phillip