In the software development process, revision control, also known as version control or source control, is the management of changes made over time. These changes can be to source code, project assets, or any other information that goes into the finished product. It permits many people to work on the same parts of a project without worrying that their changes will overwrite the work of anyone else. The collection of revisions and their metadata is called a repository or repo. The repository represents a step-by-step chronological record of every change made to help project managers revert all or part of the project to a previous state if necessary.

How revisions are made

Revision control systems are usually hosted on a networked server. After the repository is set up, using it generally involves the following steps:

  • How revisions are made.

  • Branching the development tree.

  • Centralized vs. distributed systems.

  • List of revision control software.

  • If the developer has created a new file that should become part of the project, the file must be added to the repository. The file is uploaded to the repository, and anyone else working on the project can see and use the file.

  • If the developer wants to edit a file that is already part of the project, the file must be checked out. The act of checking out downloads the desired revision of the file to the developer’s local version of the project. Usually, the revision that a developer wants to edit is the most recent revision: this revision is known as the “head”.

  • After the developer edits the file locally and is ready to add it to the official version of the project, the file can be checked in. This action is also known as making a commit. The developer is asked to write a summary of what changes were made and why. These comments, with the updated version of the file, are uploaded to the repository.

  • If someone else has checked in revisions to the same file since the last time the developer checked it out, the system announces that there are conflicts. It calculates the differences line-by-line, and the developers who made the changes must agree upon how their individual changes should be merged. The merging is usually done manually: the developers compare the conflicting versions and decide how to resolve them into one document.

  • If there are no conflicts, the new version is updated in the repository, and the entire project receives a new revision number, permanently and uniquely identifying its current state.

Branching the development tree

Experimental changes are often made to the main version of a software project. Using revision control, these changes can be made to a separate copy of the project without interfering with development of the main version. The terminology for this approach uses the metaphor of a tree: the main version of the project is called the trunk, and experimental versions are known as branches.

Centralized vs. distributed systems

If a revision control systems uses a centralized repository, its data is contained in a single database containing the authoritative version of all project files. Other systems employ a distributed model. In these systems, changes can be checked, and then synchronized between repositories.

List of revision control software

Branch, Bug tracking, Collaboration, Programming terms, Trunk