Cheat Sheet
[Previous] [Main] [Next]

CVS Cheat Sheet


We are going to cover a lot of ground in this presentation, but on a day to day basis you only need a few commands to run CVS and benefit from it. Using a command line (Linux or Windows), CD to your project folder and then execute one of the following commands

cvs ci -m"message about what you changed"
This will commit any changes you made to the repository. Each file changed will have the message attached to it. You will see new files that should probably be added to the repository with a "?" in front of them.

First CD to the folder that has new files and run cvs add with a wild card that will pick up the new files e.g.:
cvs add *.java
This will add any new java files in the current folder to the project.

cvs update
This will check the repository and copy any changes or new files added by other people.

cvs -Q diff -c myfile.java
This will show you how your current file (myfile.java) differs from the current one in the repository.

cvs update -p -D "2002-12-1 23:59:59 GMT" Deliver.java > temp.java
This will copy the last copy of Deliver.java that was submitted on 12/2/2002 into a new file called temp.java.

cvs update -p -r1.3 Deliver.java > temp.java
This will copy a revision 1.3 of Deliver.java into a new file called temp.java.