CVS Quick Reference
We use the concurrent versioning system (CVS) for source code control in our
group. This page has my personal quick reference guide to frequently
used commands.
If you've never used CVS before (or are a bit rusty), I recommend going through
the CVS
tutorial from Cal Poly.
For a more detailed distillation of the CVS man pages, see my cvs info page. For joint-authored papers in the
group, see my info on concurrent editing of latex
files.
I also have instructions for using CVS remotely with Unix.
Before using CVS for the first time, a user must set their CVSROOT
environment variable to the location of the code repository (/home/cadml/testdir/cvsroot for our lab). When you first put a project under CVS, remember to remove all the
generated files from the directory (e.g. all the .o files, the .exe files,
the Debug directory for MS Visual C++; the .log, .dvi, .ps etc. files for
latex).
- cvs import dir < vendortag > < releasetag > (invoked
while in root directory of source to be put under cvs; dir
should include path to directory if it's a subdirectory of
another directory already under cvs)
- cvs checkout dir (include complete path to directory
from CVSROOT, and run from directory where the top level directory
already does or
should appear)
- cvs add file | dir (not recursive; puts new file into
repository; still requires cvs commit)
- cvs rm file (after removing local copy; still requires cvs commit)
- cvs release -d dir (checks to see if local version up-to-date
before deleting it)
- cvs status [file*] (current status of file)
- cvs log [file*] (log of comments recorded for all
revision of files)
- cvs diff [file*] (whole directory's changes if no args)
- cvs diff -r revision [-r revision] file
(compare revisions)
- cvs diff -D date file (for most recent rev no
later than date)
- cvs update -d (merges changes from repository into your local directory)
- cvs commit [file*] (check in your changes - always do an update
and recompile first to check for conflicts!)
Sara McMains