Recent versions of git (>= 1.7.9) support signing individual commits with GPG.
Is it possible to retroactively sign all commits within a tree?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes: add a tag, that you would sign.
That is actually the preferred option when it comes to sign commits: sign a all set of them through a tag, rather than signing each one individually.
See "How to get pusher’s Information in post-receive hooks?".
Note (update may 2017) that only Git 2.13.x/2.14 (Q3 2017) will completely fix the signing process, because "
git cherry-pick" and other uses of the sequencer machinery and mishandled a trailer block whose last line is an incomplete line.This has been fixed so that an additional sign-off etc. are added after completing the existing incomplete line.
See commit 44dc738 (26 Apr 2017) by Jonathan Tan (
jhowtan).(Merged by Junio C Hamano —
gitster— in commit 6ebfa10, 16 May 2017)With Git 2.29 (Q4 2020), this will be more reliable.
See commit 842385b, commit 9dad073, commit 26e28fe, commit 75d3bee, commit 20f4b04, commit 5b9427e, commit 8d2aa8d, commit 424e28f, commit e885a84, commit 185e865 (30 Sep 2020) by Jeff King (
peff).(Merged by Junio C Hamano —
gitster— in commit 19dd352, 05 Oct 2020)