CVS Command Summary 

export CVSROOT=:pserver:user@host.domain.com:/home/cvs/dir

Get quick help 

cvs --help
cvs -H commit
cvs -H add

Login 

cvs login

CheckOut 

cvs checkout

Update/Check 

cvs -q update [file]

Diff 

cvs diff [file]

Commit Changes 

cvs -q commit -m "Comments:........" [file]

Add New File to CVS 

vi file.ext
cvs add -m "creation log:....." file.ext
cvs commit

Add New Directory 

mkdir new_dir
cvs add new_dir
Add New SubDir Tree:
cvs add dir_new
cvs add dir_new/*
cvs -q commit -m "- add directories"

Add Binary file to CVS 

cvs add -kb -m "creation log:....." file.bin
cvs -q commit !$

— commit right afterward

Check update history 

cvs log <dir/file>

Check directory update history excluding the files within it 

cvs log -l <dir>

Change version message 

cvs admin -m1.2:"- new text" <dir/file>

Remove File 

rm -f file.ext
cvs remove file.ext

Remove Dir 

rm -rf dir_unwanted
cvs remove dir_unwanted/*
cvs update -P

Rename File 

mv f1 f2
cvs remove f1
cvs add f2
cvs -q commit -m 'Remove ...'

Rename Directory 

mkdir newdir
cvs add newdir
mv olddir/* newdir/

Create Snapshots 

cvs -q update -D "YYYY-MM-DD"

Comment 

Once you've set CVSROOT and download every file from the cvs server, you won't need to specify CVSROOT any more for cvs status and cvs update, because it is recorded in the cvs archive, under every directory, in file CVS/Root. You still have to issue cvs login (or equivalent) every time before you connect.

Note, yet for cvs checkout, you still need to set CVSROOT.

Quick reference guide to CVS commands 

# To create your personal repository:
setenv CVSROOT $HOME/CVSRepos
cvs -d init
# set environment variables (put these in your .cshrc)
setenv CVSROOT $HOME/CVSRepos
setenv CVSEDITOR pico
setenv CVS_RSH ssh
# create a new project:
cvs import projectname username version1
# how to get a copy of a project for personal use:
cvs checkout projectname
# add a file to a project
cvs add filename
cvs add *.cxx *.h
etc...
# remove a file from cvs
rm filename
cvs remove filename
# or be fancy:
alias cvsrm 'rm \!*; cvs remove \!*'
# to check-in your changes
cvs commit
# to sync your checked out project to what is
# currently in the repository this is real useful
# if you have multiple copies of your project
# or if you have multiple developers on the same code.
# NOTE: this will not kill any of your changes (very cool!)
#       cvs is smart. It is able to merge any changes
#       with your current code and does a good job of it.
cvs update
# to see differences between what you currently have and
# what is in the repository
cvs diff filename

#: CVS Checkout

# to get a copy of your project from some time ago.
cvs checkout -D "1 day ago" project
cvs checkout -D "2 days ago" project
cvs checkout -D "4 months ago" project
# ... 12 midnight GMT
cvs checkout -D "today" project
# ... now
cvs checkout -D "now" project

#: CVS Commit Log

# to see all comments you've made
# (sort of an unorganized ChangeLog)
cvs log [files]
# show log for all subdirs under current dir.
cvs log
# local dir only, no recursion
cvs log -l

#: CVS Branches/Tags

# FYI: tags are simple. branches are founded upon tags.
# to check out a branch called RELENG_1_0
cvs checkout -r RELENG_1_0 juggler
# when in a directory with code checked out from a
# RELENG_1_0 branch, and you need to merge from the
# HEAD branch into RELENG_1_0.
cvs checkout -r RELENG_1_0 juggler
cd juggler
cvs update -j HEAD some_directory_or_files
# to tag one file
cvs tag myAwsomeTag file.cpp
# to tag all files
cvs tag myAwsomeTag .
# to create a branch
cvs rtag -b newBranchName myModuleName
# to create a branch rooted at a previously made tag
cvs rtag -b -r myAwsomeTag newBranchName myModuleName

CVS Quick Reference 

http://www.ssec.wisc.edu/mug/hot_topics/mdf/cvs_quickref.html

CVS none-usual operations 

Import 

General 

CvsModule=txt2html.tests
#expand into $CvsModule
cd $CvsModule
cvs import -m "Imported test cases, from Seth Golub" $CvsModule tsun start
cvs -q update
..
mv $CvsModule $CvsModule.org
cvs -d $CVSROOT co $CvsModule
cd $CvsModule
dircmp $CvsModule $CvsModule.org
dirdel !$
cd $CvsModule
cvs -q update

History 

export CVS_RSH=ssh; export CVSROOT=:ext:suntong@cvs.txt2html.sourceforge.net:/cvsroot/txt2html
cd /export/cvs/
#expand txt2html
cd txt2html/
cvs import -m "Imported sources, txt2html-1.28" txt2html txt2html start
cvs -q commit -m '- The latest official release, txt2html-1.28'
cvs -q update
..
mv txt2html txt2html.org
cvs co txt2html
dircmp txt2html.org/ txt2html
cvs -q update

rename 

RenameFrom=pre-in-list
RenameTo=pre.txt
mv $RenameFrom $RenameTo
$ cvs remove $RenameFrom
cvs server: scheduling `pre-in-list' for removal
cvs server: use 'cvs commit' to remove this file permanently
$ cvs add $RenameTo
cvs server: scheduling file `pre.txt' for addition
cvs server: use 'cvs commit' to add this file permanently
cvs -q commit -m "- rename $RenameFrom to $RenameTo"

Remove versions 

CvsFile=news.txt
$ cvs admin -o1.1 $CvsFile
RCS file: /cvsroot/txt2html/txt2html.tests/news.txt,v
cvs server: /cvsroot/txt2html/txt2html.tests/news.txt,v: can't remove branch point 1.1
cvs server: RCS file for `news.txt' not modified.
$ cvs admin -o1.1.1.1 $CvsFile
RCS file: /cvsroot/txt2html/txt2html.tests/news.txt,v
deleting revision 1.1.1.1
done
$ cvs admin -o1.1 $CvsFile
RCS file: /cvsroot/txt2html/txt2html.tests/news.txt,v
deleting revision 1.1
done
cvs admin -o1.2 $CvsFile