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

Re: How to interactively rebase-and-reword nth commit?

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Aug 25, 2021, 15:54 UTC
Message-ID
<CAN0heSoxE8zjzbYqRY6zvva=GEXEWx1k8FGhJMCf6N=pEcpZFw@mail.gmail.com>
In-Reply-To
<eda317b080a2e75a170c051c339a76115cce5ad7.camel@yandex.ru>
Hi Konstantin,
On Wed, 25 Aug 2021 at 16:07, Konstantin Kharlamov <hi-angel@yandex.ru> wrote:
Show 5 quoted lines
> I'm almost happy with `rebase-at`, except I don't know of any way to make it work
> with `reword` git action. You see, "rewording a commit" requires to run EDITOR twice:
> first to substitute `pick` with `reword`, and then to actually edit the commit
> message. But since EDITOR was substituted with sed, the 2nd run won't give you an
> actual editor to change the commit message.
I think GIT_SEQUENCE_EDITOR is for pretty much exactly such a use-case:
  This environment variable overrides the configured Git editor when
  editing the todo list of an interactive rebase. See also git-
  rebase(1) and the sequence.editor option in git-config(1).
Does that help, by not stomping on EDITOR/GIT_EDITOR?
Martin
Previous: Ævar Arnfjörð BjarmasonNext: Konstantin Kharlamov
Message 3 of 7 in “How to interactively rebase-and-reword nth commit?”
  1. Konstantin KharlamovAug 25, 2021
  2. Ævar Arnfjörð BjarmasonAug 25, 2021
  3. Martin ÅgrenAug 25, 2021
  4. Konstantin KharlamovAug 25, 2021
  5. ZheNing HuAug 26, 2021
  6. Jeff KingAug 27, 2021
  7. Konstantin KharlamovAug 27, 2021

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.