What is Version Control?
What are Version Control Systems?
Version control (aka VCS, short for "version control system") is a class of systems used in software development to manage changes to code over time. It allows developers to track modifications, review and collaborate on code changes, and revert to previous versions if needed. Many version control systems also provide a centralized repository for source code, allowing multiple developers to effectively collaborate on the same codebase simultaneously.
Version control is a separate system from any programming language or framework. In other words, it is used regardless of what programming language is chosen for the project. Git is by far the most popular version control system and is used by over 96% of professional developers [source].
Capabilities
Many capabilities are provided by version control systems, including the ability to:
- Compare earlier versions of code to track changes over time
- Revert to previous versions of files. This is helpful if a mistake is made or a bug is introduced.
- Group changes together to release major/minor versions of the software
- Take notes on specific code changes that are accessible to future developers
- Branch code changes separately from the main codebase, allowing multiple engineers to work on features simultaneously without interfering with one another's work
Since version control systems track changes to every code file, programmers can create, update and delete files without the worry of losing work. In addition to code changes, version control tracks the date, author, and notes on each change for better readability. Development teams commonly use these annotation capabilities to link code changes to bug tracking tools.
Lastly, development teams commonly integrate version control systems into their software deployment pipelines allowing code changes to automatically be tested and published live to customers.
Types of Version Control Systems
Among version control systems, the capabilities mentioned above are fairly universal; however, the way in which version control systems store, manage and share history differs.
Local
Local version control systems operate only within a single computer or workstation. All code and code history is stored locally.
Remote
A remote version control system (sometimes referred to as a "centralized" version control system) stores the code and version history on a remote server. Collaborators connect to this single central server to make changes. Apache Subversion is an example of a centralized version control system.
Distributed
Distributed version control systems combine the capabilities of local and remote systems. Developers can store the entire codebase locally, allowing independent work and offline changes. Developers then synchronize their local changes to a central server for other collaborators to consume. Git is an example of a distributed version control system.
Examples of Version Control Systems
Created in 1972, Source Code Control System (SCCS) is recognized as the first version control software. Today by far the most widely used is Git, and though not nearly as widely adopted as Git, other version control solutions exist such as Subversion, Mercurial and others.