Skip to content

Instantly share code, notes, and snippets.

@JasonQSY
Created January 18, 2018 07:08
Show Gist options
  • Save JasonQSY/1a9dcd9b4f16acc7ee0bbf0c0f2a1e6e to your computer and use it in GitHub Desktop.
Save JasonQSY/1a9dcd9b4f16acc7ee0bbf0c0f2a1e6e to your computer and use it in GitHub Desktop.

Resign Old Commits for Git

To resign old commits for git, just

git rebase --exec 'git commit --amend --no-edit -n -S' -i development

To make it easier,

resign = "!re() { git rebase --exec 'git commit --amend --no-edit -n -S' -i $1; }; re"

then

git resign HASH

See also https://superuser.com/questions/397149/can-you-gpg-sign-old-commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment