3 Solutions collect form web for “how does version control work?”

Different VCS use different approaches. CVS, for example, will create a file on the server for each file which you commit. This is essentially a file in RCS format; CVS is only a wrapper around RCS which runs the RCS commands over many files in a directory subtree (RCS can only work on single files).

The RCS file contains a list of changes (version number, checkin message and how much was changed). After that comes a copy of the current HEAD version. The rest of the files are the diffs between the versions (long explanation).

This way, CVS can quickly return the HEAD version (which is most often requested) and it can compute the other versions.

CVS doesn’t do any validation; if one of your files becomes corrupt, you need a backup. Since CVS is based on RCS, it can’t version directories nor can it track renames. CVS and RCS use the standard diff(1) command to create the diffs.