From: Jeff King <peff@peff.net>
To: Konstantin Kharlamov <hi-angel@yandex.ru>
Cc: git@vger.kernel.org
Subject: Re: How to interactively rebase-and-reword nth commit?
Date: Thu, 26 Aug 2021 22:04:58 -0400 [thread overview]
Message-ID: <YShISkyN7stYtkV2@coredump.intra.peff.net> (raw)
In-Reply-To: <eda317b080a2e75a170c051c339a76115cce5ad7.camel@yandex.ru>
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
next prev parent reply other threads:[~2021-08-27 2:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 14:06 How to interactively rebase-and-reword nth commit? Konstantin Kharlamov
2021-08-25 15:01 ` Ævar Arnfjörð Bjarmason
2021-08-25 15:54 ` Martin Ågren
2021-08-25 16:32 ` Konstantin Kharlamov
2021-08-26 6:28 ` ZheNing Hu
2021-08-27 2:04 ` Jeff King [this message]
2021-08-27 9:18 ` Konstantin Kharlamov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YShISkyN7stYtkV2@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=hi-angel@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).