Wrongly committed file versions to CVS repository

When a new colleague is working for the first time with CVS, it can happen that he/she does mistakes when committing files to the repository. In case a file is wrongly committed (either once or multiple times) to the repository, then it is a good practice to clean-up the mistake and delete the wrongly committed file versions.
1 answer

Delete file versions from the CVS repository

Steps:

1. After login to the server where the CVS repository is stored, go to the folder of the project:

cd [project_folder_path]

2. Delete the wrong revisions from CVS, for a specific file:

cvs admin -o [file_revision_number]: [file_folder_path/file_name]

The command "-o [file_revision_number]:" deletes all the file's revisions, starting from the specified number, including the respective revision and all the way to the end of the branch containing the respective revision.

Example:

cd /home/projects/myWebsite
cvs admin -o 1.10: public_html/calendar/availabilityView.jsp

Useful resources:
http://cvsman.com/cvs-1.12.12/cvs_133.php

Taggings: