I'm using git for code, but it's not an online solution nor a back-up system.
You can buy a private account from GitHub and push your git repository there.
Setup a bare git repository in your DropBox folder and clone from it into your development folder. The DropBox folder will act as your "remote" origin. Now you can push and pull changes to it. It will physically get backed up when DropBox notices file changes.