Product SiteDocumentation Site

3.2.3. Importing Data

Assuming that a project consisting of multiple files has already been created, organize them so that they are all in one directory. It is recommended that you use three top-level directories named branches, tags, and trunk. This is not required by SVN but it is a popular convention. The trunk directory should contain the projects files, and the branches and tags directories should remain empty. For example:
myproject/branches/
myproject/tags/
myproject/trunk
		foo.c
		bar.c
		Makefile
Once the information has been organized appropriately it is time to import it into the SVN repository. This is done with the svn import command. For example:
$ svn import /path/to/mytree \
		http://host.example.com/svn/repo/myproject  \
		-m "Initial import"
Adding 	myproject/foo.c
Adding	myproject/bar.c
Adding	myproject/subdir
Adding	myproject/subdir/quux.h

Committed revision 1.
$
As can be seen, SVN creates the required directories based on how the file tree is set up. It can now be viewed at the URL created, or by the command:
$ svn list http://host.example.com/svn/repo/myproject