The first thing you'll need in order to start using Subversion is a server to act as your central repository. Luckily, this doesn't mean you have to have a dedicated machine. If you're using Windows, a full-featured and easy-to-use option is the free version of VisualSVN. This video will walk you through downloading the VisualSVN software and installing if on your local workstation.
- [Instructor] Let's install a Subversion server on Windows. There are a few different options to choose from, but for this example I chose the VisualSVN Server from visualsvn.com. We'll be installing on a Windows 10 workstation, and there are install packages that work on 32-bit and 64-bit versions of all the modern Windows operating systems. From the home screen, click the VisualSVNServer option, because we're installing a server. If you go to the licensing section, you'll see that there's a free Standard Edition and also an Enterprise Edition that has per-server pricing.
The Enterprise Edition has a lot more features, but we won't need those for testing. We'll go ahead and use the free version. Click Download. On the download page, choose the 32- or 64-bit version, depending on your operating system. The 64-bit version is the version I need. Once the file's downloaded, I just need to double click the MSI file to kick off the install process. Let me switch to my Downloads folder.
I'll click Run. And on the first screen we see the version of Apache Subversion used by the server. It's interesting, the Apache HTTP Server is also bundled in with this software. This is nice because you won't need to set up anything special for remote access to your server. HTTP access is built in. I'll click Next, and we'll need to accept the license. I won't read the whole thing here, feel free to study that in depth when you want to install your own server. Right now I'll just click I Accept, and Next.
The default install option is the server and the administration tools, which is what we want. Make sure you also have the option for the command line tools checked here. We'll want to use those later. I'll click Next, and on this screen we get to choose between the free and the Enterprise Edition. The Standard Edition is the free one, and I'm going to use that one here. Last, we get to choose the install location, the default repository location, and the secure server port. It's easy to change these locations later, so don't worry too much about these choices.
After that, we're ready to install. Click Next, and then click Install. Now that the install is finished, just click Finish. You'll see some new program options in the Windows menu. Choose VisualSVN Server Manager. That'll open the server management console. I'll go ahead and expand the server window so we have full screen. This gives us a nice view of whether or not the server is running, whether logging is enabled, and how many users and groups have already been set up, along with how many repositories we have.
Any repositories, users, and groups will show up over here on the left. First, let's create a repository. Click the Create New Repository link. This brings up a dialogue asking what kind of repository we want. In our case it really doesn't matter, so let's leave the default option checked and click Next. Give the repository a name, we'll call it Repo1. Click Next and you'll see the VisualSVN offers to create the trunk branch tag structure for us.
We don't want to do that right now. My preferred way is for each project to have its own trunk branch tag hierarchy, so the empty repository option is the right one for me. Make sure that's selected and click Next. We won't do anything special with user permissions, so let's give everyone Read / Write access and click Create. Now we can click Finish. After that, we need to create at least one user account so we can actually access the repository. I'll click on VisualSVN Server on the left, and click Create New User.
I'll create an account that has a username of Julian, and I'll give it a password. And click OK to create the user. All right, let's create a project, so we can test this out. Right click the repository we created and choose New Project Structure. Give the project a name, I'll call this TestProject1.
And click OK. When we expand the repository, we can see that the branches, tags, and trunk folders have been created for us. You can also see in the dark gray area on the right hand pane that there's a URL next to the repository name. We can use that URL on a browser to access the repository and make sure everything works. Actually, instead of typing the URL in manually, you can just right click the repository name and copy the URL to the clipboard.
Right click the repository, Copy Url to Clipboard. Switching back to the browser, I can paste that URL in, press Enter, and it'll ask me to log in. I can use the same name I just created as a user. And there's a new repository, ready to use.
- Trunks, tags, and branches
- Checkout, commits, and revisions
- Merging, locking, and working with a team
- TortoiseSVN on Windows
- SVN integration with Eclipse
- Connecting to a project
- Creating a new Java project in Eclipse
- Connecting to an existing Java project using Eclipse
- Dealing with projects that move to a new location
- Making changes and creating branches
- Tracking changes and dealing with conflicts
- Creating a release