Next Previous Contents

3. CVS Overview and Concepts

Here, in words, is how CVS works. You create a special directory (called a CVS "root" directory) that you never, ever work in directly. Think of it as a repository of your "master copies" of any projects that you've placed under CVS control.

The master copy of a particular project (kept in a CVS root directory) is referred to as the project archive in this howto. One never works directly with an archive, but rather accesses it only via cvs commands. This archive is a lot more than just a "copy" of the current working snapshot of a project. It actually contains the information required to reconstruct all the variants of the project files that were ever committed to the archive, with contemporaneous log documentation, timestamps, and more.

Using cvs commands, you check a working copy of a project out from its archive, update any or all of the files in the working copy, edit or otherwise change them, test them, and eventually commit the changes back to the archive (documenting what you have done in the process). You can do anything you want to the working copy without affecting the archive unless/until you commit the changes. You can have several working copies out at the same time and work in each in turn. You and somebody else can each have their own working copies out and work (each on their own copy) at the same time.

By only working on the actual archive and root via CVS commands, you protect yourself against many of the slings and arrows of outrageous fortune. This may seem cumbersome if you are not used to it, but in fact it is all very easy and can even be largely automated by Clever Tricks, some of which are given below.

3.1 Filesystem Constructs

As we just saw, there are three basic filesystem constructs underlying CVS:

The next section will tutorially focus on setting up these filesystem constructs.

3.2 Setup Steps.

To use CVS (initially) you typically perform the following steps:

3.3 Work Cycle

From this point on a typical project work cycle will be either (for personal documents):

or, for shared projects:

That's pretty much it. Although CVS has many, rich, powerful commands for sophisticated manipulation of complex projects, most people just don't need most of them most of the time. This mini-howto will concentrate on getting you through just enough of the CVS commands that you can accomplish these work cycles for personal or shared projects. If and when you need to do something that is above and beyond this list, you will need to consult the actual CVS manual(s):


Next Previous Contents