Importing Your First Files

Once you've created the layout of your initial repository on disk you can import it into your Subversion repository. For example, you have created the following directory structure in your home directory:

myprojects/
|
|- project1/
|
|- trunk/
| |
| |- (current working files, directories, etc)
|- tags/
|- branches/

You can then import this by using the svn import command. Eg:

$ cd $HOME/myprojects/
$ svn --username jim import . https://nusvn.ncl.ac.uk/svn/nuser/

At this point vi (or whatever your EDITOR environment variable is set to) will be started for you to enter a log message, in this case something along the lines of "Initial import." should be sufficient. Save and exit the editor and the import should start. Example:

Authentication realm: nuser Subversion Repository
Password for 'jim':
Adding project1/trunk
Adding project1/trunk/file1.c
Adding project1/trunk/file2.c
Adding project1/trunk/info.txt
Adding project1/branches
Adding project1/tags
Committed revision 1.