Having had a bunch of conflicts to some git-files (indexes et c) in my git repositories in a Dropbox folder I looked for information on doing it in a more safe/sane way. Found this on stackoverflow:

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 repository. 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 $ git init --bare project.git
~/Dropbox/git $ cd ~/project

~/project $ git remote add origin ~/Dropbox/git/project.git
~/project $ git push -u origin master

From there, you can just clone ~/Dropbox/git/project.git that you have associated with your Dropbox account (or have shared this directory with people), you can do all the normal Git operations and they will be synchronised to all your other machines automatically.

I wrote a blog post, On Version Control, […] on my reasoning and how I set up my environment, it's based on my Ruby on Rails development experience, but it can be applied to anything, really.

Then again, as mentioned in the other answers on stack overflow, there is risk of causing corruption using Dropbox so it might not be a great idea (in fact, it might potentially lead to horrific experiences and lost data), so bear that in mind.