Skip to content

Instantly share code, notes, and snippets.

@rpdelaney
Forked from marceloalmeida/.gitattributes
Last active October 24, 2022 16:15
Show Gist options
  • Save rpdelaney/14c8f3d92a5090b72840b7f90bc6285b to your computer and use it in GitHub Desktop.
Save rpdelaney/14c8f3d92a5090b72840b7f90bc6285b to your computer and use it in GitHub Desktop.
How to show git diffs for gpg-encrypted files?

How to show diffs for gpg-encrypted files?

Git supports showing diffs for encrypted files, but has to be told to do so.

git config --global diff.gpg.textconv "gpg --no-tty --decrypt"
echo "*.gpg filter=gpg diff=gpg" >> .gitattributes
echo "*.asc filter=gpg diff=gpg" >> .gitattributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment