add command to create a new file or directory in the
source repository. The files or directories specified with add
must already exist in the current directory (which must have been
created with the checkout command). To add a whole new directory
hierarchy to the source repository (for example, files received
from a third-party vendor), use the import command
instead. See import.
If the argument to add refers to an immediate
sub-directory, the directory is created at the correct place in
the source repository, and the necessary add still creates
the administration files in your version of the directory.
This allows you to use add to add a particular directory
to your private sources even if someone else created that
directory after your checkout of the sources. You can do the
following:
$ mkdir new_directory
$ cvs add new_directory
$ cvs update new_directory
An alternate approach using update might be:
$ cvs update -d new_directory
(To add any available new directories to your working directory,
it's probably simpler to use checkout (see checkout)
or `update -d' (see update)).
The added files are not placed in the source repository until you
use commit to make the change permanent. Doing an
add on a file that was removed with the remove
command will resurrect the file, unless a commit command
intervened.
See remove examples for an example.
Unlike most other commands add never recurses down
directories. It cannot yet handle relative paths. Instead of
$ cvs add foo/bar.c
you have to do
$ cd foo
$ cvs add bar.c