Peter Bojanics put this together for OpenConcept. CVS (Concurrent Versions System) is a powerful tool, but this guide should help with commonly used tasks.
| Use Case | CVS Command |
| Bring my sandbox up-to-date | cvs update |
| Commit changes to file | cvs commit -m "reason you are checking this file in" |
| Put a new file or directory under version control (files must be committed, directories do not need to be ) | cvs add filename |
| Remove a file from CVS (it is not neccessary to remove directories ) | cvs rm -f filename |
| Pull code from a certain date | cvs update -D '01/25/2002 12:00 PDT' |
| Pull code from certain branch/tag/revision | cvs update -r tagname |
| Pull code the trunk, resetting "sticky" tags (needed after you use "cvs update -D" or "cvs update -r") | cvs update -A |
| What branch/tag/date/revision are my files stuck to? | cvs status |
| Who committed checkins on this file and why? (a.k.a "who broke the build" ) | cvs log -Nb filename |
| What tags/branches have been attached to this file? | cvs log filename |
| "Roll back" file to specified revision/tag/branch | cvs update -pr tagname filename > filename |
| "Roll back" file to specified date | cvs update -pD '01/25/2002 12:00 PDT' filename > filename |
| Rename file with Unix/CVS | mv oldfile newfile cvs add newfile cvs rm oldfile cvs commit -m "renamed oldfile to newfile" newfile oldfile |
| What are the differences between the repository's version and my version of a file? | cvs diff filename |
| Bring my sandbox up-to-date, discarding my uncommitted changes | cvs update -C |
Peter Bojanic 2003-02-07
Bojanic.ca
| Attachment | Size |
|---|---|
| CVS_Cheat_Sheet.pdf | 23.33 KB |

