gitgit-rebasegit-sign

Change previous commits messages while keep them signed-off


I have a bunch of signed-off and pushed commits. I want to change their messages. However, when I do so with commands such as: git rebase -i HEAD~12 and reword their signatures disappear (I check it with git log --show-signature). How to change commits messages while keeping them signed-off?


Solution

  • There is no way to keep the old signatures while changing (e.g. its messages) the commits.

    One way to change messages and sign-off again (creating new commits and substituting the old ones) is:

    git rebase -i -S HEAD~12