If you work with computers, be it in IT or any other discipline, there comes a day you lose work because: a file got corrupted, changes got lost due to any kind of technical defect, you collaborate on a file and lose track of who created which version/changes of the file. Or think of a shared folder with a whole bunch of Word documents named DocumentV1.X.docx, and so on, which are a nightmare to manage.
Development and QA work is no exception to this, especially for large teams. To that end, a VCS* as a part of SCM** is undeniably one of the most important architectural tools for any development team. This includes QA engineers, for a variety of use cases: test automation, approving code changes after testing, managing the CI/CD pipelines as DevQAOps, etc.
* Version Control System(s) ** Software Configuration Management
Decades of versioning
Before we dive into 6 of the most important advantages of version control systems, a little piece of history. Version control systems have already been around since the 70s, starting off with Source Code Control System (SCCS), created in 1973. Nowadays there is an abundance of systems on the market, roughly categorized in centralized (CVCS) and distributed (DCVS) variants. To name a few: Git, Apache Subversion (SVN), Azure DevOps (previously known as Team Foundation Server), Mercurial, CVS (Concurrent Versions System), and the list goes on.
For this article we will use Git as an example, as it is currently the most widespread tool. Git dates back to 2005 when the Linux development community, and in particular its creator Linus Torvalds, decided to move away from their previously used VCS BitKeeper to design their very own VCS. Git is defined by speed, a simple design and strong support for non-linear development. This makes it ideal for managing a large project like developing the Linux kernel. Exactly these features make it the quintessential development tool.
1. Tracking changes
By far the most important feature of a VCS is the ability to track changes in files and code, keeping an extensive history of all activity on a collection of code (a repository). Modern Git tools make it very easy to compare the changes, by showing the exact lines of code where modifications were done. Also it is easy to revert to earlier changes if issues occur. Branches and commits are the main elements that constitute the change tracking.
Rather than keeping code files locally and copying them to shared storage, or – perish the thought – sending them to colleagues by mail or other communication channels, a VCS stores all code in a remote repository. Which is comparable to cloud storage, but with more extensive features to facilitate the software development lifecycle. When a developer starts working on the project, they can pull (or download) the code locally to their computer. After finishing making changes they push (or upload) the code back to the remote repository on a separate branch. Like that everybody has access to it.
In the process of continuous integration and deployment, a variety of tasks can be automated using Git providers such as GitHub, GitLab, etc. Usually these providers have built-in tools for this, but as an alternative you can also use dedicated CI/CD tools like Jenkins and CircleCI. They connect to your VCS provider, track changes, and perform actions based on the type of activity. Actions include but are not limited to running unit tests and automated integration tests, deploying the application, generating packages for external use (Nuget, npm, …), etc.
Never leave home without a version control system. It is an essential tool for saving yourself from headaches when trying to figure out what change in your code was made, when and by whom.
4. Integration in development tools
There are many different tools available for developers to assist in writing code, for example JetBrains’ IntelliJ and Rider, Microsoft’s Visual Studio and Visual Studio Code, Eclipse, and so on. Most of those tools include support for VCS’s to perform actions like pulling, committing & pushing changes and keeping track of the history of the repository. All those things can be achieved in a command-line terminal as well, as it was originally designed, but the integration in development tools makes it much more visual. There are also several stand-alone tools on the market for this like Sourcetree, GitKraken, or Git’s own GUI client.
5. Useful for QA engineers
A VCS is not only a useful tool for developers, it also makes up for an integral part of a QA engineer’s daily work. Tasks can range from having a dedicated repository for test automation code, approving merge requests of developers, to managing the CI/CD pipelines including the automated tests in the setup for CI/CD, setting up automatic deployment to test environments, etc.
6. Mostly open-source
Git itself is completely open-source and free to use. In addition to Git there is a variety of Git providers, that can either be cloud-based (e.g. GitHub, GitLab, Azure DevOps) or self-hosted (e.g. Gitea). The basic features of these providers like maintaining public and private repositories are free. Corporate use and more advanced features such as CI/CD require a paid license. The same goes for most development tools and Git GUI’s, a lot can be achieved with the community versions of these tools. GitHub and GitLab are omnipresent when it comes to viewing public repositories of open-source projects. Often you see a GitHub/GitLab button next to a regular download button for such projects, leading you to the code repository.
Never leave home without a version control system. It is an essential tool for saving yourself from headaches when trying to figure out what change in your code was made, when and by whom. It facilitates and improves the efficiency of the software development lifecycle. This not only through change tracking but also by automating tasks such as CI/CD. Any team of considerable size should use a VCS, but it can also be interesting for individuals or independent developers to manage their own code. Keep versioning!