I discovered that a reword
option was added to --fixup
back in git 2.32
The basic command looks like git commit --fixup=reword:<commit>
and you can use it like you would the other autosquash commands.
I recommend creating an alias for it though.
Thanks to this post, I’ve had a fixup
alias that uses fzf
to select form recent commits so I created a similar one for reword:
[alias]
reword = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o -I{} git commit --fixup=reword:{}"
Note, if you’re on Windows, you can install fzf
via Chocolatey.
And you might also be interested in PSFzf which a Powershell module that wraps fzf
.