Your Git Repository in a Database: Pluggable Backends in libgit2
You can actually use a relational or a NoSQL database, or an in-memory data structure, or something like Amazon S3. This is made possible by the pluggable backends provided by the libgit2 library.