Store git repo in database

1.1k Views Asked by At

Is there a way to store an entire git repository in a binary blob or a single file?
Basically I am thinking of storing git repos in a database (like a key value store or a relational database), and I need the whole repo to be one blob,

One possible solution is to compress (zip) all the repo structure,

Any built in facility that I may have looked over?

libgit2 by any chance helps in this regard?

EDIT: to make it clear: I have lots and lots of git repos and I want to be able to access them from different machines, apps. My application is nothing like that, but think github.

2

There are 2 best solutions below

0
On BEST ANSWER

For the record, as @TimoGeusch mentioned git bundle was what I needed.

0
On

My application is nothing like that, but think github

Take a look at gitlab