Developing With CVS - The Theory

CVS, in some form, should fit in with your existing development tools. In some cases, it might even be built into tools you already use, but for many it runs as a separate application.

Your development probably already takes place within a directory. The same is true when CVS gets involved. It is very important that each developer work in their own directory. Even if you work out of a directory on a remote server, developers should not share directories. The reason for this is the same reason you adopt source code control in the first place. You don't want developers working on the same files without some mechanism for control.

To create a working directory for a project, a developer does a checkout of that project. This creates a directory with a complete copy of the project's file tree in which you can work. You can then work on the project, as before. When you reach a milestone, you tell CVS to add any new files to the project you have created. You tell CVS to update your work directory to get the most recent changes from other developers. You resolve any conflicts that may have occurred between your changes and another developer's changes. And finally, you commit your changes to CVS.

The update command is very important and it should be done at least before any commit, but can be done as often as you like. In addition to bringing your working directory up to date with the changes of other developers, It tells you the status of every file in your working directory.

If you're working on a substantial change, you'll want to update your work directory frequently to keep up to date with other developer's changes.

Even if you're working alone on a project, you'll want to make regular commits. This allows CVS to serve as a backup for your work.

A collision occurs when two developers change the same line in the same version of the same file. Or, in short, when two developers change the same thing. The collision will be detected when the second developer does an update after the first developer has committed his changes. The affected file will contain both versions of the lines involved with the collision. The second developer, with the aid of the first developer, will have to determine which lines to keep.

CVS Clients for Windows:

WinCVS Windows Application

Tortoise CVS Integrates with Windows Explorer

Cygwin Adds Unix/Linux shell and commands to Windows; includes CVS

-- Last edited May 5, 2004

(Not sure the sources)