Skip to content

Instantly share code, notes, and snippets.

@pancudaniel7
Forked from qdequele/gpg_resign.sh
Last active April 3, 2023 17:00
Show Gist options
  • Save pancudaniel7/a163106a336e1ea1c1252dd436b6cee8 to your computer and use it in GitHub Desktop.
Save pancudaniel7/a163106a336e1ea1c1252dd436b6cee8 to your computer and use it in GitHub Desktop.
Resign all my old commits with GPG key
#!/bin/sh
cd $1
export GIT_COMMITTERT_EMAIL=pancudaniel7@gmail.com
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "pancudaniel7@gmail.com" ]
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