I have PGP key that let's me sign the commits via git commit -S
. To sign my last commit I did a git commit -S --amend --no-edit
and it signed my commit.
Now, I want to sign all the commits that are there in the branch filtered
.
I tried: git filter-branch --commit-filter 'git commit -S --amend --no-edit'
and it gives me an error message:
$ git filter-branch --commit-filter 'git commit --amend --no-edit -S' HEAD
Rewrite 07b0ac12f5fe1d8963d7ae0ac7fbda50cb6e74a9 (1/10)gpg: skipped "Anubhav Saini <[email protected]>": secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
fatal: failed to write commit object
could not write rewritten commit
Another issue: raising another git commit --amend --no-edit -S
results in:
(filter-test)$ git commit -S --no-edit --amend
You need a passphrase to unlock the secret key for
user: "Anubhav Saini <[email protected]>"
[filter-test c5ea180] Removing defer and async from scripts
4 files changed, 28 insertions(+), 28 deletions(-)
Questions
- How to batch sign the commit messages?
- What is raising another sign doing actually and behind the scene?