A guest blog post by Guy Marion, CEO of Codesion – a provider of version control hosting in the cloud.
Your developers and designers often work on projects simultaneously from around the world. They need to modify the same files, make updates, and deploy multiple versions of the website or code across different sites. All the while, you hope they won’t cross wires, lose track of versions, or overwrite each others’ changes, any which scenario might set your upcoming release or project delivery date back by days. Sound familiar?
Why You Need Version Control
Having a version control or source code management (SCM) system provides a safety net against human error or corruption. A version control system compiles a complete change history and a set of natural restore points within the repository, providing peace of mind for developers and project managers alike. A good version control system lets you do the following:
– Roll Back Changes
When you make a mistake or discover a bug, you’ll want to roll back to previous changes. Just like in Apple’s Time Machine backup application, version control for your files let’s you roll back to any point in time and restore it if needed.
- Quick Undo
We all work on autopilot from time to time, or make changes in the middle of the night when we’re not thinking clearly. If your developer makes a quick change and commits it, then realizes he made a mistake, a version control system allows them to quickly undo the last change(s).
- Merge Changes Seamlessly
What happens when one developer is working on a file, makes a change, then tries to save it just as another developer is doing the same? Now you’ve got two different versions needing to be resolved (the “split brain” effect). Version control allows teammates to merge changes seamlessly, which is critical when you have multiple developers working on the same project.
- Track Changes and Ownership
As files are created or modified, you can annotate changes with comments (“commit logs”), which are tracked as your repository or file evolves over time. The version control system also tags each change with the name of the person who made it, making it easier to give them credit.
- Branching and Merging
You can break off a piece of your code (“branch”) into a separate area and modify it in isolation. Typically, developers use branches when developing a new feature or fixing a bug – to avoid polluting the main branch. Later, you can merge the code back into the common area.
- Provide visibility and insight
By monitoring commit and activity usage, you can extract detailed metrics and gauge the performance of your development team. There are many 3rd party tools you can plug into an SCM to provide these useful metrics and reporting data.
- Support for multiple file types
You can track changes made to source code (text files) as well as binary files, such as Word documents, media files, and presentations or spreadsheets. This is “track changes” on steroids!
Choosing the Right Type of Version Control System
With the abundance of free (open source) and commercial version control systems in existence, how do you choose which to use? Most professional developers today prefer open source options, which, according to a recent Forrester survey, are closing in on 50% market share. The three most common are Subversion, Git and CVS.
Subversion, the most widely used version control system today, is a centralized version control system. Developers pull down or “check out” the latest version of the central repository (“trunk”) to their local workstation, make changes, and merge (upload) those changes back in to the trunk. It’s probably the easiest of the version control systems to learn, allows for fine-grained (sub-directory level) user access control, and is easy to back up.
Built for development of the Linux operating system, Git is a distributed version control system that has an emphasis on being fast. Because a Git project lacks a central repository, every working directory is a full-fledged repository of its own, and is not dependent on network access or a central server. Git is great when you want to code offline, or have many developers working together independently on a branch, which is why Git is favored in so many open source projects.
CVS is a legacy system which was replaced by Subversion in 2004. If you’re considering CVS you should probably use Subversion instead, unless you need compatibility with old systems.
Ready to Start Using Version Control?
oDesk has partnered with Codesion to offer free version control hosting to all oDesk users for one year. Log into your oDesk account, select Manage & Work > Team Room, then choose Subversion (SVN) from the Team Tools menu to sign up. Codesion offers Subversion, Git and CVS hosting in the cloud.