seu logo     Help Pages Dr. Laura J. Baker, Professor       home >> help

Commonly Used CVS commands

  1. Set the CVSROOT path in your .profile (.profile is in your root directory) on the CS system. Be sure you export CVSROOT.
    CVSROOT=/seu/cs/home/class/cosc4351/spring2006/cosc4351g1
    export CVSROOT


  2. Create the CVS repository in the directory (this is only done once)
    cvs    -d     /seu/cs/home/class/cosc4351/spring2006/cosc4351g1     init

  3. Import the "project" (one or more files) into the CVS repository.
    cvs     import     -m    "Some message about the project directory creation" project_name cvs start

  4. To work on one or more files in the repository:
    cvs     checkout     directory_name

  5. To commit a file back to the resposity (check in a file) after modifications:
    cvs    commit     -m   "place message here"     directory_name/file_name

  6. To get the most recent copy of a file that has been checked in:
    cvs   update     file_name

  7. To place a new file into the repository:
    cvs    add     directory_name/file_name
    (changes don't take place in the repository for remove or add until a cvs commit command is issued.)

  8. To remove a file from the repository, first delete it from your working directory (which you have checkedout). Then give the cvs command to remove a file:
    cvs    remove     directory_name/file_name
    (changes don't take place in the repository for remove or add until a cvs commit command is issued.)

  9. To check the status of a file in the repository:
    cvs    status     file_name

  10. To release a project back to the repository (which you have checked out) :
    cvs    release     project_name
    cvs    release     -d     project_name (to remove from your dir.) upon release

  11. To view the changes others have made on a file, use the cvs log command.
    cvs    log     file_name