Using the CVS Client187
If the file is a binary file you must specify the –
kb
option in order for it to be properly
imported into the project.
# cvs add -kb banner.jpg
6.4.9Removing Files from a Project
If you no longer wish a file to be a part of a project, you can use CVS’s
remove
option to
rid yourself of that file. Prior to removing the file, however, it must be deleted from the working
directory.
# cvs remove index.html
cvs server: file `index.html' still in working directory
cvs server: 1 file exists; remove it first
# rm index.html
# cvs remove index.html
cvs server: scheduling `index.html' for removal
cvs server: use 'cvs commit' to remove this file permanently
# cvs ci -m "Removed index.html" index.html
Removing index.html;
/usr/local/cvsroot/fuzion/index.html,v <-- index.html
new revision: delete; previous revision: 1.3
done
If you wish to delete a file and remove it from the project in one step, you may add the –
f
flag to the remove option.
# cvs remove -f index.html
cvs server: scheduling `index.html' for removal
cvs server: use 'cvs commit' to remove this file permanently
# ls index.html
/bin/ls: index.html: No such file or directory
# cvs commit -m "Removed old files"
cvs commit: Examining .
Removing index.html;
/usr/local/cvsroot/fuzion/index.html,v <-- index.html
new revision: delete; previous revision: 1.5
done
Prior to committing a remove to the repository, the file may be resurrected by issuing the
add command.
# rm index.html
# cvs remove index.html
cvs server: scheduling `index.html' for removal
cvs server: use 'cvs commit' to remove this file permanently
# cvs add index.html
U index.html
cvs server: index.html, version 1.7, resurrected