Created
July 16, 2020 10:39
-
-
Save mattrobertsky/2072b0a1ab81e824a6a5d38240e20b46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rebase --exec 'git commit --amend --no-edit -n -S' -i <previous-commit> | |
make a branch from your branch with unsigned commits (git checkout -b ...) | |
use git log --show-signature to see which are not signed | |
use the commit BEFORE the first one you want to fix in the above command (as <previous-commit>) | |
accept the generated file (don't change it) | |
save the file | |
use git log --show-signature to show the commits are now signed | |
push up | |
I tried this and it fails with "error: gpg failed to sign the data", I think because gpg needs the passphrase, and it's not interactive.
I found the solution to this at https://gist.github.com/paolocarrasco/18ca8fe6e63490ae1be23e84a7039374
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!