Jun 17 2007

How to create a SVN repository and import a project

Published by at 6:07 am under subversion,Ubuntu

If you are new to SVN, it is a source code control(versioning) tool that is intended to replace CVS. CVS stands for Concurrent Versioning system that is very popular in software development world. SVN tries to address the deficiencies of CVS. SVN can be downloaded at this location.

This post assumes that you have already installed SVN in linux. I am showing here how to create a Source Code repository and import your first project.

Let’s do it

First, create the respository

svnadmin create /path/to/repository

for example, if you want to create the source repository in /home/username/source

then, you would issue the following command in Ubuntu.

svn create /home/username/source

The repository can be anywhere as long as you have right permissions to the directories.

Now, to create your project

Go to a tmp directory

cd /tmp

Then create the following

mkdir yourprojectname

cd yourprojectname

mkdir trunk

mkdir tags

mkdir branches

“trunk, tags and branches” are must for any SVN projects.

Then issue the following command

svn import /tmp/yourprojectname file:///home/username/source/yourprojectname -m “My first project “

Now you can delete the structure created at /tmp directory

rm -rf /tmp/yourprojectname

Hope this helps some newbies.

Update ( 1-2-2009)

How to create a new project over svn+ssh

Assumption: You already have created a repository at /home/username/source/ on the server

Do the following to create a project from your client workstation

svn import -m “your comments here” /tmp/yourptojectname/ svn+ssh://[email protected]/home/username/source/yourprojectname

enter the password when the terminal prompts.

Comments Off on How to create a SVN repository and import a project

Comments are closed at this time.