From: Aneesh Bhasin Date: Fri, 09 Sep 2011 10:50:10 GMT Subject: Re: can Git encrypt/decrypt .gpg on push/fetch? Message-ID: In-Reply-To: <87lityxbg7.fsf@lifelogs.com> Hi Ted, 2011/9/9 Ted Zlatanov > > I need to store some encrypted files in Git but for some clients with > the right GPG keys, decrypt them on checkout (possibly also encrypt them > back on commit, but that's not as important). > > diff doesn't have to work, this is just for convenience.  Can Git do > this (matching only .gpg files) or do I need my own command to run after > the checkout/fetch and before commit?  It seems pretty out of Git's > scope but perhaps others have done this before. > Have you looked at git hooks (e.g. here : http://progit.org/book/ch7-3.html). You could do the encryption/decryption in pre-commit and post-checkout hooks scripts respectively... regards, Aneesh