[1] Setting up a CVS repository on your account | [2] Setting up other members in group to use CVS on your account | [3] Basic CVS commands | [4] Resources
umask 007
(this will replace any existing umask)setenv CVSROOT $HOME/.cvsroot
(.cvsroot is the main CVS repository)groups
(this determines which groups you are a part of. Remember the group name you wish to
use CVS with)
umask 007
(all new files will be locked to outsiders
but readable and writable by the owner and group of the file)
mkdir .cvsroot
(this is the CVS repository)
chgrp group_name .cvsroot
(allows the group 'group_name' access to the .cvsroot repository -
substitute group_name with a group name from step 2 [i.e. cs354_31] )
chmod 2770 .cvsroot
(makes the repository owner and group readable and writable)
mkdir .cvsroot/CVSROOT
(all the files that CVS needs are stored within this directory)
mkdir .cvsroot/project
(where project is the name of the project you're working on. Make as
many 'project's as desired. A module with the name 'project' will be used [this
name goes in the file modules, as described on step 12])
cvs init
(this populates the .cvsroot/CVSROOT directory with the files that CVS needs. This
step assumes the CVSROOT environment variable has been set)
cvs checkout CVSROOT/modules
(this creates a CVSROOT directory tree in your root)
~/CVSROOT/modules) and insert a line that
defines the module(s) you're working on (i.e. 'project').project_name project
(where project_name is the name of the module you want defined,
and project is the name of the directory containing the
files [as created on step 8])
~/CVSROOT/modules
cvs commit -m "The message to log with this change" CVSROOT/modules
(this commits this changed file into the repository)
cvs release -d CVSROOT
(this releases (and deletes) the CVSROOT working directory, which you just checked out/in)
To import an existing directory (with files) into the repository:
cvs import -m 'Initial checkin' project_name VENDER_TAG RELEASE_TAG
(This imports (recursively) any directories/files in the current directory into the project_name
repository. VENDER_TAG and RELEASE_TAG can be anything)
Otherwise, files can be added to the repository via:
cvs add file_name
cvs commit
MAKE SURE that the CVS repository is NOT world-readable:
chgrp -R group_name .cvsroot
chmod -R g+rw,o-rwx .cvsroot
.cvsroot/projectumask 007
(this will replace any existing umask)setenv CVSROOT /u/mypartner/.cvsroot
(where, in this case, '/u/mypartner/' would be set to what $HOME was
above [i.e. '/u2/rmflatt/'] )
To checkout a project:
cvs checkout project
(This checks out the 'project' module, creating a project directory
in your current directory, containing all 'project' files)
cvs checkout project
--> to checkout files from the 'project' module in the repository onto your account...cvs update
--> will integrate any changed files on the repository into your [local] files
(i.e. your files will change, not the repository files)
cvs add file_name
--> indicates that file_name is to be added to the repository
(once a 'cvs commit...' is done)
cvs remove file_name
--> indicates that file_name is to be removed from the repository
(once a 'cvs commit...' is done)
cvs commit -m "The message..."
--> will commit any files that you've changed in your working directory into the repository
cvs commit -m "The message..." file_name
--> will commit the file file_name
cvs log [file_name]
--> prints log info [of file_name] to stdout (pipe this to a file if you
want to view the log)