Subject: Re: rebase -i: quick/inline reword

From: Sergey Organov <[email-masked]>
Date: Sat, 09 May 2020 00:14:58 +0300

"brian m. carlson" <[email-masked]> writes:

> On 2020-05-07 at 10:49:29, Sergey Organov wrote:
>> It'd be really nice if it were possible to, say, search&replace in, or
>> spell-check, interactively, all the commit messages (including titles)
>> of a bunch of commits to be published, all in a single file handled by
>> single rebase run.
>
> It is possible to do this with a bit of shell scripting.  You can run
> "git rebase -x" if you want to check every commit in a certain way.
>
> If instead you'd like to modify all the commit messages, you can use
> something like this:
>
>   GIT_SEQUENCE_EDITOR="sed -e 's/^pick /reword /'" \
>   GIT_EDITOR="some-shell-script-that-modifies-its-file-argument-in-place" \
>   git rebase -i BASE
>
> I use something similar as an alias to automatically squash all my
> squash and fixup commits without needing to open an editor:
>
>   !f() { GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash "$@"; };f

These are very good and useful features indeed, and they are examples of
batch processing that is very handy for automation, but lacks
interactivity. What I rather have in mind is being able to put all the
messages /simultaneously/ into my favorite text editor and edit them
more or less freely till I'm satisfied, then "commit" the overall result
by passing it back to git. Essentially "git rebase -i" on steroids.

-- Sergey