Using CVS to Maintain Versions of Your Software and Hand It In
CVS is a program to help manage different revisions of a program. We
will be using it to keep track of various versions of your labs, and
as a method for me to get access to your answers.
-
"cvs checkout" copies a set of files under CVS' control into your
directory. You can then edit your copies of these files. You need to
give the name of the group of files you want, which will be given in
the lab exercise (for example, if the lab said to start with the
"hello" project, you would use "cvs checkout hello" to get the files).
-
Use the "cvs commit" command in the directory containing your copies
of the files to updates CVS' copy of any files that you have changed.
CVS requires that you include a message describing your changes. One
way to do this is by typing cvs commit -m "message". Otherwise cvs
will start a text editor for you. It may start the text editor "vi";
if you're not familiar with "vi", type ":q!" to quit.
-
If you have created new files in your directory, and want to add them
to CVS, use "cvs add". You need to give the name(s) of the new
file(s) with the cvs add command, and follow the cvs add command with
cvs commit.
-
If you want to see a listing of the changes you have made, use "cvs
diff" in the directory containing your copy of the files.
-
If you decide you have made a big mistake, and want to revert your
copy to the last version you committed, just remove the files you
messed up (with the unix rm command) and then do "cvs update" in the
directory that contained them.
-
If you need to revert to an earlier copy, that is also possible - see
the manual page for CVS or ask me.
-
Use the command "cvs tag" in the directory containing your copies of
the files to put a "tag" on the current version.
Return to the page of
This page maintained by
davew@cs.haverford.edu