Posted on September 4th, 2014
As I learn (constantly) how to be a better web designer and developer, I find that my latest project iterations aren’t always the ones I end up using. For me, there’s substantial trial and error over layouts, formatting, fonts and design, and it’s helpful to have access to each version as I make changes. I could just save multiple versions of a project as I go, but I find it quickly gets messy with different stages of a website in folders, even if they have names detailed enough to know what changes they contain, which for me is never the case.
Using a version control system (VCS) is a more efficient way to save iterations without needing to duplicate folders or risk losing information you end up needing. A VCS lets you save versions of your work, letting you access old versions and manage changes that are made.
If you’re working on a team, the benefits of using a VCS are self-evident: it allows multiple users to make changes to the same project files without needing to manually compare code. Commits can be sorted by when they were made, what changed in each version, who made the commit, and the iterations are saved in case of future need.
For an individual developer or web designer, a VCS is a helpful way to keep track of important changes and save as you go without overriding information when you update a file. Even for small changes - like the color scheme of a site - having a past version to easily compare with can save time spent trying to recreate the colors that were in place a week ago. From my experience, it’s also helpful to have records of changes for future projects that might incorporate some of the elements of a web site or design.
There’s also the possibility that you will end up collaborating with others on projects, in which case it is important to know the concepts of a VCS. Without a standard way of updating the same code, it’s less easy to compare changes and iterations.
With a distributed version control system (DVCS), no single copy of a database exists, like in a central repository. Instead, working copies exist in multiple locations, each serving as a remote backup of the history of changes made to the database.
There are many benefits to this. Your version could be corrupted, something might happen to your machine, and you could lose your databases. Since DVCS let you make changes to a local repository without a network connection, you can quickly interact with the database.
Git is a commonly used DVCS. It’s a free, open source distributed version control system that is widely used on projects of all sizes. It was originally created to track changes made the the Linux kernel, so it can handle large-scale projects quickly and efficiently.
To use Git, it needs to be locally installed - unless you are working on a Mac, in which case it comes installed. There is an in-browser application available from Github and Code School if you want to learn Git before you download it - try it out!
Git also uses a branching model, which makes it possible to create different branches of a repository. This allows for experimenting with portions of the code which can either be merged with the existing repository or deleted without interfering with the original data. Also, you can control which branches to push to the repository.
Github is a popular hosting platform for Git, and it provides features that make it easy to collaborate. It also provides the ability to fork repositories. When you fork a repository, you make a copy of it where you can make changes and experiment with the code. This is great if you want to use the repository as a starting point for a project, or to suggest bug fixes for the original. Here is an example for forking a GitHub repository.
There are many other types of version control systems, but it’s important to have some way to keep track of your versions and revisions. I haven’t tried the other platforms, but with the ease of using Git and Github as a hosting platform, and the large community behind them, this seems a good starting point if you have no experience managing your files with a VCS.
As a freelance or independent designer/developer, knowing the concepts behind a version control system such as Git will establish good habits that will benefit you both on your own and in potential team situations. Not only will you be keeping copies that contain important changes to your work, but with Git and Github, you will also have a community of repositories to fork and clone.