next up previous contents
Next: Getting the Source Up: The CVS Solution Previous: CVS is not ...   Contents

A Sample Session

CVS has the notion of a repository which is a directory where it stores all of the files. We can set up a local repository:
  mkdir /home/daly/cvs
  cvs -d /home/daly/cvs init
  mkdir /home/daly/cvs/project
The first step just creates an ordinary directory to store files.
The second step initializes the directory by creating some CVS files.
The third step creates a directory to hold your project information.
Now you have a local repository.

You can now move to your home directory and start building a project:

cd ~
cvs -d/home/daly/cvs co project           
cd project
(make a new file, eg. file1.c)
cvs add file1.c
cvs commit -m"add our first file"
The first step moves us to our home directory (/home/daly).
The second step ``checks out'' the project so we can work on it.
The third step moves into the newly created directory called project.
The fourth step does local editing on the project.
The fifth step tells CVS we want to add the new file to the project.
The sixth step commits our changes to the repository.

Since we finished making changes to the project we no longer need our local project directory. We can erase it completely:

cd ~
rm -rf project

But since the project is part of the repository we can recover it at any time:

cd ~
cvs -d/home/daly/cvs co project
and our directory and files appear again.

Most open source projects are already set up. In fact, if you set up your project with one of the major sites (freshmeat, sourceforge, savannah) they will automatically set up a CVS server for you.


Subsections
next up previous contents
Next: Getting the Source Up: The CVS Solution Previous: CVS is not ...   Contents
root 2004-02-24