Hosting a Git Repo on Dropbox

dropbox git scm

Since my laptop is in for repairs, Chris de Bruyne from DesignWave agreed to help me put together the image above.

UPDATE: After using git on dropbox for a week now, I would recommend against using git in this way. I find I'm having far too much trouble for what it's worth, especially when using it on multiple machines. I feel that it's better to use normal git protocols and hosting solutions. 

I have been using Git for quite some time now, and is my favourite source control management system out there.

Earlier this week, I had to clean my computer entirely, before sending it in for repairs. Since the majority of projects that I'm currently working on, are projects in which I'm the solo developer, I needed place to backup my git repos.

Now I know you will say, “Why not host it on GitHub?”. I could pay for private repositories on GitHub, but I feel that I really don't need the full GitHub solution, for small private repositories, in which I'm the solo developer in any case.

Enter Dropbox

It was only on Sunday evening, that I suddenly realized I could host the git repos on Dropbox! Why didn't I think of this before! I've been using dropbox for a while now and I'm seriously happy with it. One of it's biggest advantages, is that it acts as a folder on my local system.

Adding my git repos to dropbox, means I can just pull and push from them as if they are sitting in a different folder on my local system. There are other advantages with the repo on dropbox as well. It means that it's automatically backed up, and that I can access it them from multiple systems. Additionally, if I do want to add another developer, I can just share the folder with them, and they can then pull from it (although, when this happens I'd surely move to github as it's more secure and focussed).

One caveat to take note of, is that you have to wait for dropbox to be fully synced before you can checkout, push or pull to the master repo. If dropbox is not fully synced, you will get all sorts of funny git errors, complaining about invalid sha1 hashes etc.



Phil - on 28 Apr 2011

Why do you now recommend against using git this way?

Andre - on 28 Apr 2011

If you are using it for your personal repos then I guess it's still ok. You have to make sure that you wait for dropbox to sync after pushing code etc.

The problems were raised as soon as I decided to share my code, via dropbox to another developer.

I'm not sure about the technical details, but at some points he was getting a lot of errors when trying to push or pull code.

Since then, i've still been using dropbox for my personal projects, but if I need to share the git repo, then I rather use Github.


You can use Markdown to format your comment.