Sometimes the log message for a git commit will mention the SHA of other commits. This happens in the suggested log message for
git revert and you also may add it by hand ('fixed bug introduced in abcd0123').
When rebasing, the SHAs of commits change. Is there a way I can automatically fix up the log messages to have the new SHAs? In general, this might not be possible in 100% of cases (a commit might disappear altogether, be squashed, etc). But 90% of the time a simple rebase leaves a one-to-one correspondence between the original and the rebased commits, so it should be possible to remap the SHAs in log messages.
I have tried
git rebase --verbose, which I hoped would print something like
Applying: My log message here. old commit was 01234 new commit is abcde
I could then use that to manually fiddle the log messages (with a further rebase... which would in turn change the SHAs... so it would be awkward, but nonetheless possible). But as far as I can tell
--verbose doesn't print more information than the normal mode.
Is there some magic tool which will rebase and rewrite the log messages for me? In the absence of ponies, can I convince
git rebase to print more information about old and new SHAs so I can do the job myself?