Checkout Files from CVS

Posted January 12, 2004 by Rex in UNIX software

Version control systems are an important infrastructure component not only in software development but also in other contexts such as controlling changes to manuscripts or computer system configuration files.

Given a properly configured CVS server, the following command will extract a working copy of the files associated with the module named “recipe” into the current working directory:

cvs checkout recipe

This command requires the environment variable CVSROOT to be set to the root directory of the CVS repository, i.e., /usr/local/cvsroot. If this variable is not set, the -d command line option can be used to specify this:

cvs -d /usr/local/cvsroot checkout recipe

Both of these commands will result in a subdirectory called recipe, created in the current working directory with the associated module files contained within.

Instead of the module name, it is possible to substitute the pathname of the desired files in the CVS checkout command to specify the desired files to extract. Individual files cannot be checked out of a CVS repository because the smallest unit to checkout is a directory.

The Conversation

Follow the reactions below and share your own thoughts.