git-crypt enables transparent encryption and decryption of files in a git repository. Files which you choose to protect are encrypted when committed, and decrypted when checked out.
git-crypt lets you freely share a repository containing a mix of public and private content.
git-crypt gracefully degrades, so developers without the secret key can still clone and commit to a repository with encrypted files. This lets you store your secret material (such as keys or passwords) in the same repository as your code, without requiring you to lock down your entire repository.
git-crypt was written by Andrew Ayer (firstname.lastname@example.org).
For more information, see https://www.agwa.name/projects/git-crypt.
git-crypt from GitHub: https://github.com/AGWA/git-crypt
$ brew install git-crypt
$ git-crypt init
$ cat .gitattributes * filter=git-crypt diff=git-crypt .gitattributes !filter !diff README.md !filter !diff
Add GPG user
$ git-crypt add-gpg-user 6A886CD6
Unlock after clone a repo
$ git-crypt unlock