Many people have their own naming system in place when it comes to saving multiple versions of a document on their computer or file sharing platforms, like Dropbox. You may have multiple files saved like this:
- spreadsheet 1-2-18.xlsx
- spreadsheet 1-3-18.xlsx
- spreadsheet 1-4-18.xlsx
or
- essay 1.0.doc
- essay 2.0.doc
- essay 3.0.doc
However, when it comes to maintaining a record of changes in documents, structure is required. That’s where version control (also known as source or revision control) comes in. Version control is a system used to track changes to a file, or group of files, in order to easily locate prior drafts when needed. These systems allow a software team to manage multiple versions of source code and make note of any changes to the code in a database.
We use version control systems so that developers can edit a file at the same time and recall earlier versions to find solutions to any mistakes without interfering with team members’ work. Over time, source code is inevitably affected by human error. Version control offsets those “honest mistakes,” and any other disastrous events, by tracking every change and test applied to the source code by individual team members. This allows developers to recall and restore an earlier version of the project.
Rather than file locking and impeding the work of other team members while one developer makes changes to the code, a successful version control system allows for a seamless flow of work and implements the following:
- Files are saved as developers edit and can easily be restored at any time.
- Team members are able to share files and view the latest version of a file.
- Members can edit a file after a change made one minute ago or one year ago.
- Track edits by explaining any changes made to the files in a message or comment.
- Identify the changes and which team member made them.
There are 3 types of version control system: local, centralized, and distributed.
Local Version Control Systems
It’s common for a single user to implement his/her own version control system by copying files into a directory and renaming them, as shown in the opening example. Although a simple method, it’s easy for users to forget which directory they’re in or copy the wrong files. As a result, programmers developed local version control systems to track all file changes under revision control.
Centralized Version Control Systems
In order to collaborate with developers in one system, programmers created a centralized version control system. This means all versions of a file reside on one server, and coders can access the server to view those files. This is the standard for version control. This allows programmers to work together, and clients are able to view the progress. With only one server, however, there’s always the risk of a malfunction which can affect everyone’s work. An example of this type of system would be Subversion.
Distributed Version Control Systems
Git is a popular distributed version control system that is free and open source. This system allows clients to mirror the entire repository and history to develop and maintain locally while also serving as a backup. This way, if any server malfunctions, the client can access the repositories to restore files. Not only that, distributed systems are easily portable. You can go anywhere with your laptop and have access to the code and full history of a project. You can merge your code when you’re done editing.
Sevaa uses the distributed version control system Git. Our main repository, a place where all of our collected repositories officially live, is based on a piece of software called GitLab. GitLab affords us nice features such as issue tracking and Continuous Integration (CI) on our deploys.
A distributed system allows our work environment to be more flexible and available, meaning we can place a copy of the repository on our laptop and work from nearly anywhere on the planet to meet our deadlines.