Skip to Main Content
Version Control with Subversion, 2nd Edition
book

Version Control with Subversion, 2nd Edition

by C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
September 2008
Intermediate to advanced content levelIntermediate to advanced
432 pages
13h 57m
English
O'Reilly Media, Inc.
Content preview from Version Control with Subversion, 2nd Edition

Name

svn import — Commit an unversioned file or tree into the repository.

Synopsis

svn import [PATH] URL

Description

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.

Alternate names

None.

Changes

Repository.

Accesses repository

Yes.

Options

--auto-props
--depth ARG
--editor-cmd EDITOR
--encoding ENC
--file (-F) FILE
--force
--force-log
--message (-m) TEXT
--no-auto-props
--no-ignore
--quiet (-q)
--with-revprop ARG

Examples

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Subversion Version Control: Using The Subversion Version Control System in Development Projects

Subversion Version Control: Using The Subversion Version Control System in Development Projects

William Nagel
Version Control with Git, 3rd Edition

Version Control with Git, 3rd Edition

Prem Kumar Ponuthorai, Jon Loeliger

Publisher Resources

ISBN: 9780596510336Errata Page