Secure Gpg Diff

24 Aug 2023

Table of Contents

  1. Solution and problem

Solution and problem

I use GPG encrypted files within my ORG setup. However, if I save a .gpg file without significant changes, or when I only added information, GIT cannot detect this. There is however an option to overrule this:

echo "*.gpg filter=gpg diff=gpg" >> .gitattributes
echo "*.asc filter=gpg diff=gpg" >> .gitattributes

and

git config --global diff.gpg.textconv "gpg --no-tty --decrypt"