Name

svn add — Adds files and directories

Synopsis

svn add PATH...

Description

Adds files and directories to your working copy and schedules them for addition to the repository. They will be uploaded and added to the repository on your next commit. If you add something and change your mind before committing, you can unschedule the addition using svn revert.

Alternate Names

None

Changes

Working Copy

Switches

--targets FILENAME
--non-recursive (-N)
--quiet (-q)
--config-dir DIR
--auto-props
--no-auto-props
          

Examples

To add a file to your working copy:

$ svn add foo.c 
A         foo.c
          

When adding a directory, the default behavior of svn add is to recurse:

$ svn add testdir
A         testdir
A         testdir/a
A         testdir/b
A         testdir/c
A         testdir/d
          

You can add a directory without adding its contents:

$ svn add --non-recursive otherdir
A         otherdir