Basic Commands:

  • cvs init: Initialize a new CVS repository.
  • cvs checkout [module]: Check out a working copy of a module.
  • cvs add [file]: Schedule files or directories to be added to the repository.
  • cvs commit -m “[message]”: Commit changes to the repository with a commit message.
  • cvs update: Update your working copy to the latest revision.
  • cvs status: Show the status of files and directories in your working copy.
  • cvs diff [file]: Display the differences between your working copy and the latest revision.

Repository Operations:

  • cvs import [project] [vendor] [release]: Import unversioned files or directories into a repository.
  • cvs export -r [tag] [module]: Export a clean directory tree from the repository.
  • cvs tag [tag] [files]: Tag files with a specific label.
  • cvs rtag [tag] [module]: Create a branch or tag across multiple modules.

Branching and Merging:

  • cvs branch [branchname] [files]: Create a branch for specified files.
  • cvs update -j [rev1] -j [rev2] [files]: Merge changes from one branch to another.

Tagging:

  • cvs tag [tag] [files]: Tag files with a specific label.
  • cvs tag -d [tag] [files]: Delete a tag from specified files.

Undo Changes:

  • cvs update -C [file]: Revert changes made to a file.
  • cvs remove [file]: Schedule items for removal from version control.

Informational Commands:

  • cvs log [files]: Show the log messages for files.
  • cvs history [files]: Show the history of changes made to files.
  • cvs annotate [file]: Display file annotations (showing who last modified each line).

Global Configuration:

  • Edit .cvsrc file: Configure global CVS options.

Ignoring Files:

  • Edit .cvsignore file: Ignore specific files or patterns in your working copy.

CVS is a robust version control system, and understanding these commands will help you effectively manage source code and collaborate with other developers.