git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: rebase -i: quick/inline reword

From
Sergey Organov <sorganov@gmail.com>
Date
May 8, 2020, 21:14 UTC
Message-ID
<87sggab031.fsf@osv.gnss.ru>
In-Reply-To
<20200508000538.GE7234@camp.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 20 quoted lines
> 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
Previous: brian m. carlsonNext: Johannes Altmanninger
Message 8 of 13 in “rebase -i: quick/inline reword”
  1. Solomon UckoMay 7, 2020
  2. Junio C HamanoMay 7, 2020
  3. Jeff KingMay 7, 2020
  4. Sergey OrganovMay 7, 2020
  5. Solomon UckoMay 7, 2020
  6. Sergey OrganovMay 7, 2020
  7. brian m. carlsonMay 8, 2020
  8. Sergey OrganovMay 8, 2020
  9. Johannes AltmanningerAug 16, 2020
  10. Junio C HamanoAug 16, 2020
  11. Sergey OrganovAug 16, 2020
  12. Junio C HamanoAug 16, 2020
  13. Sergey OrganovAug 16, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.