How to collaborate on projects with SVN

6

Index

Stats

22,453 visits, 58,184 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 25 Apr, 2013. Last updated 1 Apr, 2020

Setting up an SVN system on Windows

Now we've covered the basics of Construct folder projects, let's get set up with the tools to make it work. We'll be using Visual SVN Server for the server and TortoiseSVN for the clients. You don't have to use these particular tools, and there are many alternatives out there, but we've chosen them since they are free, visual, and relatively simple to set up.

Setting up the server

First of all, decide where you'll run the server. For small teams it's likely to be on a team member's own computer, but if possible use a separate always-on system. Note if you have a remote team and you run the server on a computer behind a router doing Network Address Translation (NAT - very common in homes and offices), you will need to configure the router's port forwarding. The simplest thing to do is either have everyone on the same LAN, or run the server on a machine with a dedicated internet connection that isn't affected by NAT. If you can't avoid NAT, the default ports Visual SVN Server uses are 8080 and 8443, so set up the router to forward those ports to the server computer's IP address. (Refer to your router documentation if you need help with this.)

On your chosen server system, download and install the free standard edition of Visual SVN server (if you need more features there's a paid option, but the free one should suffice for now). Make sure you install Visual SVN Server and not Management Console Only. Repositories refers to where the data for the master project is stored; you might want to store this on a particular drive since the server stores every change permanently, which can end up taking a lot of space. If you're behind a NAT and set up port forwarding, change the server port to 8443.

Here's what the server management should look like once you're installed:

Visual SVN server has lots of features. For brevity, we'll just cover the basics.

A Repository is effectively a master copy on the server. A server can run multiple repositories in case you wanted to co-ordinate multiple independent projects through the same server. You can also simply add multiple projects to one repository (which Visual SVN recommend). However we need at least one!

Right-click on Repositories and select Create new repository.... Choose a repository name (e.g. your company name or project name). For this tutorial we'll be using the name MyRepository. Also tick 'Create default structure' - this will enable some useful advanced features you might need later down the line. Press OK, and the repository should appear. Note branches and tags aren't necessary right now; at first all your files will be going in 'trunk' (i.e. the master copy).

Nobody can log in to the server yet, so we need to create some users. Right-click 'Users' (in the tree under 'Repositories') and select Create user.... Enter a username and password for yourself and press OK. Repeat this for each member of your team, giving them a username and a password.

We're done with the server! First, we need to get its URL so the clients can connect to it. Right-click your new repository in the tree on the left (in this case, MyRepository), and select Copy URL to clipboard. Here's what the server I just set up is called:

scirra-pc3/svn/MyRepository

Note Scirra-PC3 is the computer name of the server. Other computers on the local area network can connect to this just fine, but other computers on the internet don't know how to find it. For a directly connected server, substitute the name with the IP address (e.g. 123.45.67.89/svn/MyRepository/). For a server behind NAT, substitute it for the IP address of the router (i.e. your public IP address) and make sure you've set up port forwarding so the given port (8443 in this case) forwards to the local IP of the server computer.

We're done setting up the server! The server will keep running even if the manager window is closed. If you want to bring it back to tweak settings or add more users, you can find it in the Start menu.

  • 8 Comments

  • Order by
Want to leave a comment? Login or Register an account!