Version Control
Also known as: Revision control, Source control, Version control system, VCS
System that records changes to files over time so that people can track history, revert mistakes and collaborate on the same codebase.
Version control is the practice, and the software, of tracking every change made to a set of files. Each saved change, often called a commit or revision, records what was modified, who made the change, when and usually why. The full history allows anyone to see how a project evolved, compare versions, find when a bug was introduced and roll back to an earlier state. Branches let people work on separate lines of development in parallel and later merge them. Though built for source code, version control is also used for documentation, configuration and data.
Early systems tracked individual files on a single machine: SCCS, developed at Bell Labs in 1972, and RCS, released in 1982. Centralized systems such as CVS and Subversion followed, in which a single server held the authoritative history. Distributed systems then gave every developer a full copy of the repository. Git, written by Linus Torvalds in 2005 to manage Linux kernel development, became the dominant tool, and hosting services such as GitHub and GitLab built collaboration features, including the pull request, on top of it.
Version control underpins collaborative software development and practices such as continuous integration, code review and infrastructure as code, in which server configuration is managed like source code. It makes experimentation cheap, since a failed idea can simply be discarded, and gives teams an audit trail of who changed what. Limitations remain: most systems handle large binary files poorly without extensions; histories can accidentally capture secrets such as passwords that are hard to purge; and simultaneous edits to the same lines still produce merge conflicts that people must resolve.
Key points
- Version control records each change to a set of files, along with its author, time and description.
- Branching and merging let many people develop features in parallel and combine their work.
- Git, created by Linus Torvalds in 2005, is the most widely used version control system.
- Committed secrets can persist in history, so credentials should never be stored in repositories.
Related entries
Git
Free and open-source distributed version control system created by Linus Torvalds in 2005, used to track changes in source code.
GitHub
Web platform owned by Microsoft for hosting Git repositories and collaborating on software through pull requests, issues and automation.
Merge Conflict
Situation in version control where changes from different branches touch the same part of a file and cannot be combined automatically.
Pull Request
Proposal to merge a set of code changes from one branch or fork into another, used as the focal point for review and discussion.
Code Review
Practice in which developers examine each other's source code changes to find defects, share knowledge and keep the codebase consistent.
Continuous Integration
Development practice in which programmers merge changes into a shared repository frequently, with each change verified by an automated build and tests.
GitOps
Operational model in which a Git repository holds the declared state of infrastructure and applications, and automated agents keep systems in sync with it.
Linus Torvalds
Finnish-American software engineer who created the Linux kernel in 1991 and the Git version control system in 2005.
Featured in guides
Referenced by
Other entries that discuss or point to Version Control.