Skip to page content

Git + Dropbox: the workflow of champions

I’ve been using this setup for some time now and it’s so insanely useful it’d be a shame if I didn’t share it. (Note: this isn’t new.) Basically, I use Git for my source control and Dropbox as my online repository—and it’s a snap to set up.

  1. Create a directory in your Dropbox folder for your projects. Mine’s called “Projects.”
  2. Open up a terminal and go to the directory of the project you’d like to host on Dropbox.
  3. In the terminal type: git clone --bare . ~/Dropbox/[projects folder]/[project name].git
  4. Then type: git remote add [project name] ~/Dropbox/[projects folder]/[project name].git

That’s it! Now after every local commit, you can push your changes to Dropbox by doing git push [project name] master.

When I want to work on a project on my laptop, I run git clone ~/Dropbox/[projects folder]/[project name].git once to grab the initial code and git pull origin master everytime I want to pull new changes in.

Have your say