lets say I have a huge PR and I want to do some automatic rewrite of some of the commit messages.
Pretty sure there is a way to automate git-rebase to run commands for every commit (for example to sign/re-sign) but I like the git commit --fixup amend:hash
model as I would be able to review and drop if i don't like the result (without deep reflog dive)
when I try -F
/--file
with --fixup
I get this error:
$ git commit --fixup amend:21d53a765cf8925ffcdae9199dde4e96760be974 -F /tmp/z
fatal: options '-F' and '--fixup' cannot be used together
Now I get it - the first line needs to be amend! <exact-original-first-line>
and sure I can write a script and set GIT_EDITOR
to that script (and what I intend to try) but -is there no cleaner way?