This is Part 3 of The Beginner’s Guide To Setting Up a Development Environment.
Personally, I’m a big fan of version control and generally don’t work on any programming-related projects without it. Once you’ve introduced a bug into a system, broken an application, and have no way to remove the bug without hours of work, you begin to appreciate the value of source control.
Version control systems, services, and associated software is deserving of its own series, but I’d argue that if you’re just getting into development, those systems may be overkill.
That said, I think everyone still needs to maintain some type of file history. Dropbox makes this exceptionally easy.
Later in the series, we’ll look at how you can run your entire development environment out of your Dropbox directory, but let’s lay the foundation for that first.
1. Get a Dropbox Account
I know that most of you already have a Dropbox account, but if not, head over to the Dropbox website, sign up, and get started.
You get 2GB’s of free, cloud-hosted space. Sign up takes less than two minutes.
Download the client application, install it, and you’re good to go.
2. Organize Your Dropbox Directory
Dropbox provides a basic file structure for you upon installation. Since we’re going to be running our projects (and ultimately our entire environment) out of this particular directory, we need to keep it organized.
Nothing is worse that having a random assortment of project files, images, and source files laid out in a single directory, right? So create a folder called Projects.
Although you can choose to organize your files however you want, I recommend placing them in their own subdirectories.
This pays dividends in the long run as your project base grows and as we move to running our environment out of this directory.
3. Test Out File Version History
At this point, we’re ready to test out version control. If you’re already running files out of your Dropbox, then you can skip the next step; however, if this is new to you, then let’s create an example.
- Create a file in one of your profile directories, save it, and wait for Dropbox to sync it.
- Edit the file we just saved and wait for Dropbox to sync it, once again.
Now, on one of your sync’d files, right click, select the Dropbox menu, and then select View Previous Versions:
This will open your default web browser and show you a list of all of the revisions that you’ve made to this file:
If you’d like to rollback to a previous version of the file, select the time of the revision, and click restore. That version will now live in your Dropbox. Note that if you’d like to see what version you’re rolling back to, you can click on the ‘Preview’ icon for that particular version.
The nice thing is that this is availabile for any file that you’ve got stored in your Dropbox regardless of the size of the project. This makes it really easy to experiment with source code that isn’t your own without fear of busting an entire system for good.
Secondly, if you have multiple machines then installing Dropbox on those machines will give you access to your projects and their current state wherever you are.
No, Dropbox is not considered version control but if you’re getting started in setting up your own development environment and aren’t quite ready to work with a team on major projects, this is an excellent solution for tracking your changes.
Brian Notess says
Now I’m curious what those blurred-out projects are 🙂
Tom McFarlin says
The Team wouldn’t be terribly happy with me if I showed them off just yet ;).
Eric J says
I love dropbox but one huge caveat is that dropbox only keeps file revisions for 30 days unless you pay $40 a year for packrat http://www.dropbox.com/help/113 <- not a referral link.
Tom McFarlin says
Yep – and that’s one of those decisions that you gotta make as you get more serious about your work.
I think Dropbox is great for a short term solution, but when you go long term and get larger projects, I’d definitely suggest moving to hosted Subversion, Git, or some other source control system.