From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Sergey Organov <sorganov@gmail.com>
Cc: Solomon Ucko <solly.ucko@gmail.com>, git@vger.kernel.org
Subject: Re: rebase -i: quick/inline reword
Date: Fri, 8 May 2020 00:05:38 +0000 [thread overview]
Message-ID: <20200508000538.GE7234@camp.crustytoothpaste.net> (raw)
In-Reply-To: <87imh8m346.fsf@osv.gnss.ru>
[-- Attachment #1: Type: text/plain, Size: 969 bytes --]
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
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2020-05-08 0:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 4:27 rebase -i: quick/inline reword Solomon Ucko
2020-05-07 4:52 ` Junio C Hamano
2020-05-07 11:46 ` Jeff King
2020-05-07 12:17 ` Sergey Organov
2020-05-07 14:01 ` Solomon Ucko
2020-05-07 10:49 ` Sergey Organov
2020-05-08 0:05 ` brian m. carlson [this message]
2020-05-08 21:14 ` Sergey Organov
2020-08-16 0:14 ` Johannes Altmanninger
2020-08-16 5:36 ` Junio C Hamano
2020-08-16 12:24 ` Sergey Organov
2020-08-16 16:55 ` Junio C Hamano
2020-08-16 12:21 ` Sergey Organov
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200508000538.GE7234@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=solly.ucko@gmail.com \
--cc=sorganov@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).