0cklhg
Last Updated: September 21, 2016
·
71
· sukima

Tracking ASCII armored PGP/GPG keys with Git

Since PGP keys are not something that can be merged as text and are quite meaning less in a diff this trick allows you to have a human readable version of the changes.

Add this to your Git config (global $HOME/.gitconfig or per repo ./.git/config):

[diff "pgp"]
  textconv = gpg -v

Now in the repo that contains a PGP key simply add this to a .gitattributes file:

*.asc diff=pgp -merge