リポジトリからファイルを消去します。 実際にリポジトリに反映されるのは、commit 後です。
消去したいファイルは、まず作業ディレクトリ上のファイルを 削除する必要があります。
shimaki:~/tmp/hello $ ls CVS/ hello.c README ChangeLog shimaki:~/tmp/hello $ rm hello.c shimaki:~/tmp/hello $ cvs remove hello.c cvs remove: scheduling `hello.c' for removal cvs remove: use 'cvs commit' to remove this file permanently shimaki:~/tmp/hello $ |
-f オプションを利用すると作業ディレクトリ上のファイルの削除を 同時に行うことができます。また、rm で誤ってファイルを削除してしまう ということを防ぐことができます。
shimaki:~/tmp/hello $ ls CVS/ hello.c README ChangeLog shimaki:~/tmp/hello $ cvs remove -f hello.c cvs remove: scheduling `hello.c' for removal cvs remove: use 'cvs commit' to remove this file permanently shimaki:~/tmp/hello $ |
commit する前であれば、add を利用して削除したファイルを復活させる ことができます。
shimaki:~/tmp/hello $ ls CVS/ hello.c README ChangeLog shimaki:~/tmp/hello $ rm hello.c shimaki:~/tmp/hello $ cvs remove hello.c cvs remove: scheduling `hello.c' for removal cvs remove: use 'cvs commit' to remove this file permanently shimaki:~/tmp/hello $ cvs add hello.c U hello.c cvs add: hello.c, version 2.1, resurrected shimaki:~/tmp/hello $ |