Before we start, let's mention that this is all done local to the repository machine. You can do some of the steps remotely, but that's a little more complicated, and this is a simple guide. Also, this is for a multi-user setup, not just for you; if you're setting up CVS just for you, you can follow these steps, but you'll be doing a little more than is absolutely required.
Notation about examples:
Values given in italics are example values only; replace them with
something more appropriate to your actual situation.
setenv CVSROOT /data/cvsroot
.
Bourne shell and derivates would use something like
CVSROOT=/data/cvsroot; export CVSROOT
.
sudo mkdir $CVSROOT
sudo chgrp cvsusers $CVSROOT
...and then the permissions:
sudo chmod g+rwxs $CVSROOT
.
cvs init
cd /tmp mkdir FOO cd FOO cvs checkout CVSROOTIf you check out the administrative module, you're cool.
So you now have a working repository. It's not all that useful until
you get a module of your own in there. Do not ... let me emphasize that:
There are ways to create module: you can create an empty module and fill it
in, or you can import an existing codebase. Let's assume you're going to
start with an empty module, since it's good practice to start your projects
under some sort of version control from the very beginning. You can create
an empty module by running "cvs import
" in an empty directory.
Let's say that you're going to call your module coolstuff.
cd /tmp mkdir BAR cd BAR cvs import coolstuff $USER start...provide the appropriate log information, and you're set. Check out your new module with
cvs checkout coolstuff
and CVS will
create a directory named coolstuff in the current working directory.
Add files with cvs add filename
, followed by a
cvs commit filename
to push the file to the repository.
Directories are added with cvs add directoryname
and
are created on the repository immediately.