Tahoe as git remote
Matthieu Rakotojaona
matthieu.rakotojaona at gmail.com
Mon Oct 26 16:51:37 UTC 2015
Le vendredi 23 octobre 2015 04:18:57 CEST, Jean-Rene David a écrit :
> Hello,
>
> I would like to use tahoe as a storage for my
> personal git repositories. The idea would be to
> have a local git repo for live work, and a
> tahoe-based bare remote where I could push my work
> and clone from.
>
> From the little I understand of tahoe, this could
> be a viable use-case since most files in a git
> repo are small and unmutable.
>
> The problem I would like to solve is how to get
> git to write its objects to tahoe. Is sshfs my
> only option? I read that this may not be entirely
> reliable.
>
> Are there other options? I'm perfectly willing to
> write some code. But I'm not sure where to start.
>
> Thanks,
Hello,
There is also the possibility to use
$ tahoe cp -r /path/to/git/repo tahoe:path/to/git/repo
which will copy all the git files to your grid.
If you do it directly (ie share your working directory), then tahoe will
not be considered as a "true" remote so it may not be advisable. Instead
what you can do is have a central list of *bare* repositories on your
machine, like ~/repos, which you configure as a remote of your working
repository:
~/repos$ mkdir projectX
~/repos$ cd projectX
~/repos/projectX$ git init --bare
~/repos/projectX$ cd /path/to/working/repo
path/to/working/repo$ git remote add origin ~/repos/projectX
And then you can synchronize ~/repos/projectX to tahoe. You can even use
pre-receive and post-receive hooks to automate it.
More information about the tahoe-dev
mailing list