Skip to content

Instantly share code, notes, and snippets.

@letranloc
Forked from qdequele/gpg_resign.sh
Created December 28, 2020 07:22
Show Gist options
  • Save letranloc/1263876c401789f9ac3ef6534e893a11 to your computer and use it in GitHub Desktop.
Save letranloc/1263876c401789f9ac3ef6534e893a11 to your computer and use it in GitHub Desktop.
Resign all my old commits with GPG key
#!/bin/sh
cd $1
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
then
git commit-tree -S "$@";
fi
' -- --all
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment