Dropbox, a service I can’t live without, inherently stores file version history. This got me thinking, what if I set up my local web root to live in my dropbox folder? I can work on files locally, edit and save them at will, and know that each time I hit save, the newest version will upload to the web.
A word of caution, notice I didn’t say version control. I have no idea how this solution will scale to a team of 2+, it just depends on how Dropbox handles collisions, but for a single developer on a single system, like say in a freelance environment, this can totally save your bacon.
1. Move Source Code to Dropbox Directory
As a mac user, I just copied “sites” from my home directory and pasted it into my Dropbox directory. Then I jumped in my IDE (Coda) and remapped my local version to match it.
2. Configure Local Web Server to Dropbox Directory
Again, mac user alert. I use MAMP but you can substitute your preferred flavor of web server. Just remap that guy to your new Dropbox web root.
3. Enjoy Instant File Versioning!
The advantage, of course, is that if something breaks, or I accidentally over-write a file, or I delete an image, I can always login to the Dropbox website and fetch the last known version that worked! Sweet!
I am still playing with this setup, so mileage may vary. I can see this especially useful if you’re averse to proper version control, or if it is overkill for you.
This could totally work for designers, too. Ever make destructive changes to a PSD and find yourself wishing you could go back in time three days and recover your long lost valuable layers and old work?
Well, with Dropbox, now you can.
Eric Dye says
You just blew-up my mind.
Sweet.
Joseph Parente says
Nice thinking. It’s a little bit slow saving large PSDs sometimes, but can be an absolute life-saver. Definitely going to try it with code today.
dewde says
Yeah the PSD idea assumes you have a healthy pipe to the net.
peace | dewde
Brian Notess says
YES! I Just started doing this when I no longer carried a laptop. It’s awesome.
I also started using dropbox to sync local databases (via MAMP).
Scott Lee says
I also did this for a bit. But instead of changing the MAMP directory, I created softlinks. I highly recommend the softlink approach.
dewde says
Good thinking, Scott! Thanks for sharing.
peace | dewde
dewde says
ooOOoooh great tip as long as the DBs are empty dev instances and not chock-full o’ data.
peace | dewde
Brian Notess says
Yeah, I’m not sure I’d trust it with a huge database, but my frustration was moving desktop to desktop and not having my DB changes show up both places.
Solution:
MAMP + Dropbox + SymbolicLinker = Awesome synced databases!
John Anderson says
I’ve been doing this for a couple months now, and it works pretty well! One suggestion is to create a symlink to your existing docroot instead of moving your docroot into your Dropbox folder. This gets all the benefits of Dropbox without having to relocate your docroot!
http://wiki.dropbox.com/TipsAndTricks/SyncOtherFolders
Hope that helps,
John