cvs -d ~/cvsroot init
mkdir emptydir; cd emptydir cvs -d ~/cvsroot import -m 'CS351 course work' cs351 vendor-tag release-tag cd ..; rm -rf emptydirThe ``vendor-tag'' and ``release-tag'' are not important in this context. (They are used when importing a directory tree populated with some other organization's code.) Just use something random.
cvs -d ~/cvsroot checkout cs351
cvs update
cvs commit -m 'log file entry' file.cc
cvs add foo.cc cvs commit -m 'foonly class' foo.cc
mkdir assignment1 cvs add assignment1
rm file.cc cvs remove -m 'no longer in use' file.ccNote that the file continues to exist in the repository in that you can fetch old versions, examine its log, etc.
export CVSROOT=~/cvsroot
cvs diff file.ccExamine history of a file. Works even if file is deleted in current version.
cvs log file.cc | moreDifference between specified versions.
cvs diff -r1.23 -r1.24 file.ccRequest particular version from repository. Works even if file is deleted in current version.
cvs update -r1.23 file.ccRequest head version from repository.
cvs update -A file.cc
cvs tag handin-28-Jan-2001 foo.c bar.c foo.h bar.h Makefile
// CVS version control block - do not edit manually // $RCSfile$ // $Revision$ // $Date$ // $Source$You can put similar comments in Makefiles. You can also have the program print the version upon invocation, as a debugging aid:
cerr << "foo $Revision$ $Date$" << endl;
M-x cvs-updateIn the resulting *cvs* buffer go: C-h m for documentation on available commands.
Important *cvs* buffer commands:
a - add c - commit, then C-c C-c in the resulting CVS log entry buffer d d - diff against repository