Introduction to CVS

Introduction

CVS is a version control system which allows multiple developers to access and modify files from the same project in an organized way. CVS ensures that developers don't modify files at the same time, or accidentally overwrite changes made by other developers. It also keeps backups of previous versions of files. For more info on CVS, see the CVS homepage.

Basically, the CVS repository is the "official" copy of the project files, and your checkout of the files is your working copy. Checking out files and directories from the CVS repository is like making a photocopy of the CVS repository files and keeping the photocopy for own use. You mark up the "photocopy" with your changes and then put the photocopy back into the CVS repository so that it becomes the official copy. Your "photocopy" is called your working copy, and it can be on any machine, in any directory. To complete the analogy, you can make changes to the files in your working copy and test them before actually adding and committing them to the CVS repository.

You need to make sure that you update your working copy of the files frequently, so that your working copy isn't missing changes that other developers have made to the CVS repository. Sometimes you will find that someone else has modified a file that you are trying to modify. In this case you'll need to resolve the conflict before adding and commiting your modified file to the CVS repository.

Using CVS

Since plenty of tutorials have been written on how to use CVS, I'll just point you to one CVS tutorial. There's a bit of a learning curve to using CVS, but once your get the hang of it it's much more convenient than the alternatives. It's worthwhile to read through this tutuorial once before starting with CVS since there are several details that can be frustrating if you're not aware of them.

Common CVS Commands

Once you have a basic understanding of CVS, here's a reference for some common CVS commands.

To add files and directories: (for example add subdirectory and its files/directories to parentdirectory)

To remove files and directories: (for example remove subdirectory and its files from directory)

Common CVS Outputs



Last updated: 06/30/2003 by Janna Balling