Is it possible to have git encrypt and decrypt a file during a push/pull?

Possible Duplicate:
git encrypt/decrypt remote repository files while push/pull

I’d like to store some private data in a git repository that is going out in the world, basically some private configuration, and so on. I’d like to (somehow) have the file encrypted either as I commit it, or as I push it (preferably the latter, because then I can do reasonable diffs against the text form), and also obviously the inverse.

  • Bad crypto practice in Git-encrypt?
  • Securely deploy public repo to remote VM from Travis CI?
  • What do I need for Travis-CI to decrypt secure variables on my fork?
  • Are git push and pulls encrypted?
  • Is there an encrypted version control system?
  • How do I wrap git file merge with pre- and post-processing?
  • Is this possible with git’s hooks?

  • What's a good way to organize a large collection of personal scripts using git?
  • How can I print out the value of a git configuration setting (core.autocrlf) on Windows?
  • Git pack file entry format
  • What is the best way to deal with vim plugins on multiple machines?
  • Eclipse + Maven Plugin + EGit Plugin = Checkout from GitHub a specific Branche and Tag?
  • Xcode merge two branch Git
  • One Solution collect form web for “Is it possible to have git encrypt and decrypt a file during a push/pull?”

    One way of doing this is is to encrypt the objects as they’re being staged, and decrypted on checkout. This is rather earlier than doing it solely on push / pull, but might be useful to you.

    The way to do this is to use git’s “smudge” and “clean” filters, but it’s not necessarily recommended for reasons that are explained here by Junio C Hamano, the maintainer of git:

    If you still decide to go ahead, you may want to look at this implementation of encrypting/decrypting clean/smudge filters:

    Git Baby is a git and github fan, let's start git clone.