How to send a signed git patch

Jacob Bachmeyer jcb62281 at
Sat Nov 11 03:48:18 CET 2023

Daniel Cerqueira via Gnupg-users wrote:
> Hi everyone.
> I want to send my po translation of GnuPG.
> Werner told me to send a signed git patch to a list.
> So, I signed my git commit with my GnuPG key. And when I do
> `git format-patch master` the created patch does not have this signature.
> How can I create a git patch with a GnuPG signature?

You would have to sign the output of `git format-patch` separately.

Git signatures are stored in tag objects which refer to the signed 
commit.  An exported patch is only part of a commit and therefore does 
not carry the commit ID, which is what Git signs, if I recall correctly.

Another option would be to attach a Git bundle to an email, generated 
using `git bundle create origin/master..SIGNED-TAG-FOR-PATCH` although 
this would be less easily reviewed.

-- Jacob

More information about the Gnupg-users mailing list