Skip to content

Instantly share code, notes, and snippets.

@pierrenel
Created April 10, 2011 16:15
Show Gist options
  • Save pierrenel/912473 to your computer and use it in GitHub Desktop.
Save pierrenel/912473 to your computer and use it in GitHub Desktop.
Via HackerNews at some point, how to use Dropbox & Git
Using git+dropbox together effectively? - Stack Overflow
I think that git on dropbox is great. I use it all of the time. I have multiple computers (two at home and one at work) that I use dropbox as a central bare repo. Since I don’t want to host it on a public service and I don’t have access to a server that I can always ssh to, Dropbox takes care of this by syncing (very quickly) in the background.
Setup is something like this:
~/project $ git init
~/project $ git add .
~/project $ git commit -m "first commit"
~/project $ cd ~/Dropbox/git
~/Dropbox/git $ mkdir project.git
~/Dropbox/git $ cd project.git
~/Dropbox/git $ git init --bare
~/Dropbox/git $ cd ~/project
~/project $ git remote add origin ~/Dropbox/git/project.git
~/project $ git push origin master
From there, you can just clone ~/Dropbox/git/project.git that you have associated with your dropbox account (or have shared this dir with people), you can do all the normal git operations and they will be synced to all your other machines automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment