Symbolic linking to Dropbox

Recently I’ve been thinking how can I back up my local git repositories and working copies. Use github, bitbucket and so you may say. Yes, I am using them, but I want to back up all my work in the cloud, even the changes I haven’t saved yet. Enter Dropbox.

You all know about Dropbox, but recently I was wondering how can I add a file there without actually moving the file and disturbing my working structure and environment. Thanks god I am on an unix based system (mac os X) so that I can easily do a symbolic link to the folder(s) I want to have backed up.

The command (in Terminal) is quite simple:
ln -s PathToYourProjectFolder NameOfTheLink

In my case I did:
ln -s ~/Sites Dropbox/Sites

and a link to Sites appeared in the Dropbox folder and Dropbox started syncing.