Skip navigation

CVS Cheat Sheet

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 CaseCVS Command
Bring my sandbox up-to-datecvs update
Commit changes to filecvs 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 datecvs update -D '01/25/2002 12:00 PDT'
Pull code from certain branch/tag/revisioncvs 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/branchcvs 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/CVSmv 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 changescvs update -C

Peter Bojanic 2003-02-07
Bojanic.ca

AttachmentSize
CVS_Cheat_Sheet.pdf23.33 KB