How to create local SVN repositories

This is a reminder for myself (and everyone else who can't live without version control any more) to remember how user-local Subversion repositories can be created and used.

First, we need to find a place for the repository to live in.

bash-3.2$ pwd
/Users/guenther
bash-3.2$ mkdir SVN
bash-3.2$ cd SVN

Now, let's create the actual repository. (Pretty easy)

bash-3.2$ svnadmin create Repository
bash-3.2$ ls -l
total 0
drwxr-xr-x  9 guenther  staff  306 16 Mär 20:12 Repository
bash-3.2$ svn co file:///Users/guenther/SVN/Repository WorkingCopy
Checked out revision 0.
bash-3.2$ ls -l
total 0
drwxr-xr-x  9 guenther  staff  306 16 Mär 20:12 Repository
drwxr-xr-x  3 guenther  staff  102 16 Mär 20:12 WorkingCopy

We've already got a working copy of the repository checked out now, which we can work with using the svn tool. There's no user authentication required, since we're accessing the repository directly using the "file://" protocol. Don't forget to create folders for your projects (trunk, tags, ...?) using svn mkdir and commit them using svn commit -m "initial commit".

In Eclipse, use the SVN Repository Exploring perspective to create a new repository location with the URL file:///Users/guenther/SVN/Repository (or wherever it may be).

Update: Markus posted a weblog entry explaining how to access such repositories remotely and transparent via SSH. (in german)