abhi
abhi

Reputation: 1756

Sign a pushed Git commit without amending

Considering the following:

git commit -m "I forgot to git commit -s"
git push

Is there any way to go back and sign an unsigned git commit that has already been pushed? Is the only way to do this through amending?

Upvotes: 1

Views: 91

Answers (1)

VonC
VonC

Reputation: 1324937

Another alternative is to create a tag on that commit, and signed the annotated tag. See "Git Tools - Signing Your Work".

Then you can push the tag itself.

Upvotes: 1

Related Questions