A version control system is a system that allows teams of programmers to access a common set of project files. Version control systems work by allowing you to post a project to a source code repository to make it available to other members of your work group. Once the project is posted, other programmers can download the project from the repository, edit the project, and upload their changes to the repository.
NetBeans offers built-in support for a number of popular version control systems. We will be working with the version control system Subversion.
The first step in using Subversion with NetBeans is to install the Subversion client software.
Windows NetBeans users will do this by installing the Windows Subversion client plug-in. In NetBeans, go to Tools/PlugIns and click the Available PlugIns tab. Type 'Subversion' into the search box to locate the Bundled Subversion Client plugin for Windows.
![]() |
Click the checkbox next to the plugin and click Install to install the plugin.
Mac users should already have a Subversion client installed on their computer. The only thing you will have to do is to tell NetBeans where that client is located. Select Preferences from the NetBeans menu to bring up the Options window. Click the Miscellaneous tab and then select the Versioning category. Select Subversion from the list on the left of the window.
The only thing you should have to set here is the path to the Subversion client. To locate the client, click the Browse button and look in either /usr/bin or /usr/local/bin for a file named 'svn'.
![]() |
The first thing your group will want to do with Subversion is to upload your project folder to a Subversion repository. I have set up a Subversion repository at directmath.com that you should be able to access from any location. I have created separate user accounts for each of the groups working on the final project.
To place a project in the repository, open the project in NetBeans. Right-click on the project and select Versioning/Import into Subversion Repository... In the dialog that appears type 'svn://directmath.com/' as the repository url and enter the user name and password I have provided you for access.
![]() |
Click Next to proceed to the second screen. On this screen you will select a name for your project in the repository. Try to make sure that you are not using a name that has already been used in this repository. Click the Browse... button to see a list of projects that have already been uploaded to the repository to make sure that you are not accidentally using a folder name that has already been taken. Type a message in the message box and click Next.
![]() |
The final window you will see is a window that confirms the list of files and directories you are about to upload to the repository. For your first upload you should leave all files and directories checked. Click Finish to finish uploading your project.
![]() |
To download a project from the Subversion repository, select Team/Subversion/CheckOut...
Enter the details for the repository as before.
![]() |
The next screen will allow you specify a project to download from the repository and a location to put the project on your computer.
![]() |
Click the Browse button next to the Repository Folder field to see a list of projects that have been uploaded to the repository. Select your project from that list. Click the Browse button next to the Local Folder field to select a location to download the project folder to. Click Finish to download the project.
Any project that you download from the repository will automatically come under version control by NetBeans. This means that NetBeans will actively track the changes you have made in the project or its source files. If you edit code in a source file, you will see highlights in the editor that indicate where you have made updates to the original source.
![]() |
After you have edited the source code in your project, you will want to commit the changes you have made to the repository. To commit changes in a single source code file, right-click on the file in the project pane and select Subversion/Commit... The dialog that pops up will ask you to enter a commit message. The commit message will help you find an earlier version should you or another programmer need to roll back the modified file to an earlier version.
![]() |
You can also commit all changes you have made to the project wholesale by right-clicking on the project and selecting Subversion/Commit...
You can learn more about how to use Subversion with NetBeans by going to this page.