using dropbox as git repo

November 12, 2016

Today I realized that most of the private GitHub repos that I was using were getting zero benefit from hosting on GitHub. Then, I thought it would be simple just to host them directly on Dropbox, which worked great.

However, I started thinking through the implications of a partially synced Dropbox or what would happen if there was a conflict and how that could potentially corrupt my repo.

With a little research, I found the perfect solution: Git Remote Dropbox. This works fantastically well for the couple of Private repos I need.

Because I had created a full repo directly on Dropbox, I couldn’t figure out how to convert over my repo because the instructions listed:

git clone "dropbox://path/to/repo"

That example kept failing with an empty repo, so I thought maybe I was getting the paths wrong. The problem is that you can’t have the Git repo directly in Dropbox at all. First, move the repo out of Dropbox onto your regular filesystem, then just do a remote add as follows:

git remote add origin "dropbox://path/to/repo"

This did exactly what I expected, and I’ve had no issues since.

comments powered by Disqus