A quick SVN tutorial
Here is a quick tuto to setup a repository with svn on an online host assuming a ssh connexion. We will use the command line as you will probably need to use it to work on your remote server.
Your local source code is in /home/localaccount/myapp
Your remote space is on /home/remoteaccount/www/
Let’s create the repository directory on your remote account :
cd /home/remoteaccount/www
mkdir svn
cd svn
mkdir myapp
Now, we tell svn to make this directory a repository:
svnadmin create –fs-type fsfs ./myapp
As a good practice, we will create the usual branches, tags, and trunk subdirectories in the repository.
First we create a directory structure :
cd /home/remoteaccount/www/
mkdir structure
cd structure
mkdir branches tags trunk
Now we import the structure:
svn import /home/remoteaccount/www/structure/. file:///home/remoteaccount/www/svn/myapp –message ‘Initial repository layout’
Finally we import the source code:
Run this command on our local account:
cd /home/localaccount/
svn import /home/localaccount/myapp/. svn+ssh://remoteaccount@ssh.mydomain.com/home/remoteaccount/www/svn/myapp/trunk –message "initial import"
(do not forget the /trunk/) If you have a ssh properly setup with rsa key you won’t have to type any password.
I find this tuto quite hostile but my point is to use the command line. In general, I use a GUI (subclipse) but the only case where I have to actually type svn commands is when I setup a repo on my remote server. Maybe you are in the same case !
Posted in Software | no comments |
home
about
archives
