Go to the first, previous, next, last section, table of contents.

Concepts of Version Control

When a file is under version control, we also say that it is registered in the version control system. Each registered file has a corresponding master file which represents the file's present state plus its change history, so that you can reconstruct from it either the current version or any specified earlier version. Usually the master file also records a log entry for each version describing what was changed in that version.

The file that is maintained under version control is sometimes called the work file corresponding to its master file.

To examine a file, you check it out. This extracts a version of the source file (typically, the most recent) from the master file. If you want to edit the file, you must check it out locked. Only one user can do this at a time for any given source file. (This kind of locking is completely unrelated to the locking that Emacs uses to detect simultaneous editing of a file.)

When you are done with your editing, you must check in the new version. This records the new version in the master file, and unlocks the source file so that other people can lock it and thus modify it.

Checkin and checkout are the basic operations of version control. You can do both of them with a single Emacs command: C-x C-q (vc-toggle-read-only).

A snapshot is a coherent collection of versions of the various files that make up a program. See section Snapshots.

The model of checkin and checkout does not quite fit CVS. CVS has no such thing as locking; multiple users can simultaneously edit their copies of a file, and then check in their own variants of the file, but these variants must be reconciled later. See section Using VC with CVS.

Go to the first, previous, next, last section, table of contents.