Thread (7 messages) flat view 7 messages, 5 authors, 2021-08-27

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

From: Jeff King <hidden>
Date: 2021-08-27 02:05:00

On Wed, Aug 25, 2021 at 05:06:03PM +0300, Konstantin Kharlamov wrote:
Any ideas, how can I tell `git` that I want to "reword" nth commit right away? Sure,
I am not the first one to stumble upon it, am I? Any ideas?
Have you looked at the new --fixup options in 2.32? E.g.:

  git commit --fixup reword:HEAD~2

will immediately drop you in an editor to adjust the commit message. The
result is a new "fixup" commit which is then applied when you
autosquash. So you could do multiple such adjustments, and then:

  GIT_EDITOR=: git rebase -i --autosquash

to apply them all to the appropriate spots.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help