Subversion Overview

We are running an Subversion server at

To use Subversion you will need most of the time the svn command which is installed on all of our UNIX platforms. On Windows we suggest using TortoiseSVN, also available in our Windows Environment.

Requesting a Subversion Repository

Please send a request to with the name of the repository you wish to have. We will create the repository and send you the access credentials. You can then add coworkers by your own through

We don't actually create new SVN repositories anymore. Please use Git on instead. As a D-ITET user you can log in there with your NETHZ credentials and create Git repositories by yourself.

Checking Out the Repository

When you have got a repository you can begin with these steps to start with your project:

Create a subdirectory in your home directory, preferably with the same name as the repository, which would correspond to the name of one of your projects.

user@hostname:~>mkdir myproj

Make first contact with the svn server, you will be asked to enter your password, which will be saved in a hidden .svn folder so you won't be asked anymore.

user@hostname:~>svn checkout
Authentication realm:  myproj
Password for 'muster':
Checked out revision 0.
user@hostname:~>ls -lA myproj
total 8
drwxr-xr-x   7 muster  myproj        512 May 27 18:11 .svn/

There is the .svn folder in which Subversion stores settings like the project repository, server and so on.

Now you can create a structure inside this project. We recommend one like "trunk", "releases" and "tags". The first is for the main development (working directory), the second is for milestones of your development (fixed releases without known bugs) and in tags you can put in fixed steps in your development toward a new release. This is just a recommendation though.

An example of this (not the best way, but just to show how it would work):

cd myproj
mkdir trunk tags releases
svn add trunk tags releases

A more elegant way to achieve the same by creating the structure directly on the Subversion-server:

user@hostname:~>cd myproj
user@hostname:~>svn mkdir trunk tags releases

You can start now 'populating' the project directory:

user@hostname:~>svn checkout
A  myproj/trunk
A  myproj/revisions
A  myproj/tags

Note that here you do not create the subdirectories yourself, Subversion does it for you as defined on the server and the system adds necessary information in the .svn subdirectory too.

Adding Files To Your Repository

We will now assume that you have got some Perl-files in your home, which you want to add to your trunk.

user@hostname:~>cp ~/perl/*.pl trunk

To let Subversion know that there are new files which need to be stored centrally, do the following:

user@hostname:~>cd trunk
user@hostname:~>svn add *

The 'A' stands for added (to Subversion).

We assume now that you have edited some files and want to commit the changes centrally:

user@hostname:~>svn commit -m "Saving the first version" #-m is the comment for this revision
Adding         trunk
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Adding         trunk/
Transmitting file data ..............................................
Committed revision 1.

Deleting Files From Your Repository

We could now delete the files in the trunk directory and a checkout or update would again fetch the files from the last revision:

user@hostname:~>rm -r trunk
user@hostname:~>svn checkout
A  trunk/
A  trunk/
A  trunk/
A  trunk/include
A  trunk/include/
Checked out revision 4.

Before editing files, you should always do a svn update to get the latest revision of the files.

user@hostname:~>vim trunk/
user@hostname:~>svn commit -m "saving" trunk
Sending        trunk/
Transmitting file data ...
Committed revision 5.

Note: Revision 5 is a set for the repository tree (for ALL the files) even if the only difference between revision 4 and 5 is in the file

Generating Tags In A Repository

We can now generate a 'tag' (a snapshot of the last revision):

#as a first important step, check-in all changed files of the trunk
user@hostname:~>svn commit -m "pretagging commit" trunk
#then do the tagging directly on the server
user@hostname:~>svn copy -m "tagging version release-1.0" \;

To remove a badly tagged version you can do this too directly server:

user@hostname:~>svn rm

To have a look which taged versions are available:

user@hostname:~>svn ls

To move whole branches from one place in the repository to another:

user@hostname:~>svn mv

Further Steps

This above were just basic steps to show you the concept behind Subversion. We recommend you to read the reference book called Version control with Subversion

Known Problems

GNOME keyring is locked and we are non-interactive


Services/VersionControlSystems/Subversion (last edited 2020-09-03 12:58:43 by pmeier)