Tuesday, March 18, 2008

The remove Command

The remove command removes files and directories from a CVS repository. Before removing a file, you need to delete files from the current working copy of the repository. Use the remove and commit commands, respectively, to delete the files from the repository. For example, to use the remove command, the syntax is:
$ rm new.txt
$ cvs remove new.txt
$ cvs commit –m "Removed file" new.txt
Note
You need to explicitly state the file name in all the commands. CVS does not need a method to remove directories. To delete a directory, first delete all the files from working copy of the directory. Use the remove command to delete all the files from CVS and commit the changes. Change the current directory to one level above and run the update command with the –P option, which removes the empty directory.For example, to use the remove and the commit commands, use the following syntax:
$ rm new1.txt
$ rm new2.txt
$ cvs remove new1.txt new2.txt
$ cvs commit –m "Removed files" new1.txt new2.txt
$ cd.
$ cvs update –P

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home