Git + Dropbox, The Easy Way

There seems to be a lot of differing opinions out there on how best to handle git + dropbox.

My solution, is to keep it simple. Store git bundles in dropbox.

Further, I’ve added a hook for post-commit to dump the bundle right into dropbox. This way, I a) force myself to commit more because I can’t lazily rely on dropbox syncing all saved files and b) assure that my files–nay, the whole repository!–is backed up into the cloud.

My .git/hooks/post-commit file looks like this:

#!/bin/sh
cd ~/Documents/Code/BeerProject
git bundle create ~/Dropbox/GitBundles/BeerProject.git.bundle master

And that’s what I call, The Easy Way.

7 thoughts on “Git + Dropbox, The Easy Way

  1. Pingback: Git plus Dropbox, The Easy Way « Boardmad

  2. Pingback: Git plus Dropbox, The Easy Way | Rocketboom

    • I’ll look into it, but YACS (Yet Another Cloud Service) might be annoying. I’m already actively using Dropbox and Copy, not to mention Google Drive (mostly for Google Docs). I could be “clouded” out. :)

      • Haha, I see what you mean. The advantage with Seafile is that you can host your own server, though. So, it’s “your” cloud service.

        • I’ve taken a look at seafile’s page, 1GB for free is good enough for source code hosting. For now, I’ll stick with the dropbox solution, but I’ll keep seafile in mind.

          More research could be needed, but if it allowed me to push to remote and have a proper remote repository, then that might be pretty cool.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>