This documentation was written to describe the 1.6.x series of Subversion. If you are running a different version of Subversion, you are strongly encouraged to visit http://www.svnbook.com/ and instead consult the version of this documentation appropriate for your version of Subversion.
svn import — Commit an unversioned file or tree into the repository.
Recursively commit a copy of
PATH
to
URL
. If
PATH
is omitted,
“.
” is assumed. Parent
directories are created in the repository as necessary.
Unversionable items such as device files and pipes are
ignored even if --force
is
specified.
--auto-props --depth ARG --editor-cmd CMD --encoding ENC --file (-F) FILENAME --force --force-log --message (-m) MESSAGE --no-auto-props --no-ignore --quiet (-q) --with-revprop ARG
This imports the local directory
myproj
into
trunk/misc
in your repository. The
directory trunk/misc
need not exist
before you import into it—svn
import will recursively create directories for
you.
$ svn import -m "New import" myproj \ http://svn.red-bean.com/repos/trunk/misc Adding myproj/sample.txt … Transmitting file data ......... Committed revision 16.
Be aware that this will not
create a directory named myproj
in
the repository. If that's what you want, simply add
myproj
to the end of the URL:
$ svn import -m "New import" myproj \ http://svn.red-bean.com/repos/trunk/misc/myproj Adding myproj/sample.txt … Transmitting file data ......... Committed revision 16.
After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree.