Free SVN Hosting, Trac, SSL, ACLs, Petabyte Storage
There are two ways to get new files into your Subversion repository: svn import and svn add. We'll discuss svn import here and svn add later in this chapter when we review a typical day with Subversion.
The svn import command is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. svn import doesn't require a working copy, and your files are immediately committed to the repository. This is typically used when you have an existing tree of files that you want to begin tracking in your Subversion repository. For example:
$ svnadmin create /usr/local/svn/newrepos
$ svn import mytree file:///usr/local/svn/newrepos/some/project \
-m "Initial import"
Adding mytree/foo.c
Adding mytree/bar.c
Adding mytree/subdir
Adding mytree/subdir/quux.h
Committed revision 1.
The previous example copied the contents of directory
mytree under the directory
some/project in the repository:
$ svn list file:///usr/local/svn/newrepos/some/project bar.c foo.c subdir/
Note that after the import is finished, the original tree is not converted into a working copy. To start working, you still need to svn checkout a fresh working copy of the tree.
While Subversion's flexibility allows you to layout your
repository in any way that you choose, we recommend that you
create a trunk directory to hold the
в€śmain lineв€ť of development, a
branches directory to contain branch
copies, and a tags directory to contain tag
copies, for example:
$ svn list file:///usr/local/svn/repos /trunk /branches /tags
You'll learn more about tags and branches in ChapterВ 4, Branching and Merging. For details and how to set up multiple projects, see the section called в€śRepository Layoutв€ť and the section called в€śPlanning Your Repository Organizationв€ť to read more about в€śproject rootsв€ť.
All Plans Include
![]() |
![]() | All plans free for 2008 |
![]() | Trac wiki linked to each repository |
![]() | Online management tools |
![]() | Access control lists (ALCs) |
![]() | Read only or read write users |
![]() | Secure HTTPS connections |
![]() | Data mirrored onto backup servers |
![]() | Disk usage reporting |
![]() | Online invoices & payments |
![]() | Unlimited support |
![]() | Click for Free Subversion Hosting |

