How do you use IPFS for source code revision control?

From @jrdlph on Thu Dec 17 2015 22:45:57 GMT+0000 (UTC)

I have heard (and generally understand the notion that) ipfs has version control ‘built in’. I am wondering if anyone is actually using it for this specifically in the domain of source code revision control.

If so, how are you doing this? What sort of workflow are you employing to use IPFS to manage a revision history for your source code, and how are you ensuring that the whole history is maintained and accessible through IPFS?

When I first ran into IPFS, this was really the first thing I thought of: a dvcs where the continued availability of the code was sort of tied to how many people were interested in it, independent of some centralized host, but possibly backed by one to help maintain an official head commit and work contributions into it.

If an actual project exists that automates this with a specialized command line tool, I would definitely be interested in that too.

Edit I know there are git mirroring/rehosting tools out there, but I am more interested in leveraging ipfs natively as the core mechanism for composing source code revision histories.

Copied from original issue:

1 Like

From @fazo96 on Mon Dec 21 2015 16:01:37 GMT+0000 (UTC)

I don’t think anyone does it, IPFS is a really great platform to build distributed version control software because it has deduplication built in and immunitability of objects. However, no such version control tool has been built, and I think forking git at the moment to try to get it to use IPFS as storage is way too much work and everyone capable to do that is more busy working on IPFS instead.

To better answer your question, as far as I know no projects exist that use IPFS for version control, except in a very simple way like ipscend.

Maybe someone will build a cool dvcs on top of IPFS, or we will see git working better with it.

About actually building one

You could have each commit be an IPFS object, and reference the previous commit via its IPFS hash. Then, you’d have no way to actually edit commits, just copying old ones and altering them to create new ones. That means that changing one commit also changes every single commit that is further down the dependency tree.

You’d have to use IPNS to reference anything that changes, like repos and branches.

What about private repos? Could that work on ipfs?

AFAICT nothing on IPFS is private. But you could encrypt it.

Recently Radicle and pando has emerged as version control systems using IPFS.

Note that as of 2019-05-19, they are of experimental quality, so don’t be too eager to migrate all your repos.