How to Get Started With Command Line Subversion on Windows

While there's plenty of graphical clients for Apache Subversion, it's useful to have the option of interacting with Subversion from the command line. In this article, we cover the basics of command line Subversion, from checking out a working copy, to making your first changes and committing them back to the repository.

Steps

In Apache Subversion, commands are entered via a terminal window.

To open this in Windows, press the ‘Windows key’ and ‘r.’ This will bring up the ‘Run’ dialog box. Enter ‘cmd’ and hit ‘Ok.’

  • The terminal window will now open, ready for you to input your commands.WH.shared.addScrollLoadItem(‘3bd70790f8504f1854b42006ef51c274’)

To create your first repository, use the ‘svnadmin create’ command followed by the path where you wish to create the new repository, and the name of your new repository.

For example, if you wanted to create a new repository called ‘New project’ in the ‘Documents’ folder, the command would be: svnadmin create C:UsersJessicaDocumentsNew_Project

Check in the ‘Documents’ folder.

You will see a new folder called ‘New Project.’

This folder contains some new files.

Do not delete or modify any of these files.

WH.shared.addScrollLoadItem(‘d68980533a34fc5fae02c70f923b9e84’)

Now you have created a repository, checkout a working copy. This is done using the ‘SVN Checkout’ command, followed by the URL of your repository and the location of the repository you just created on your computer. In this example, the command is: svn checkout http://127.0.0.1:9880/New-Project C:UsersJessicaDocumentsNew_Project Hit ‘Enter.’

When you check your working copy, you will notice copies of all the files from your repository.

Now you are free to make changes to your working copy.

When you have finished modifying your files, you will need to commit your changes back to the repository. To perform a commit, use the ‘svn commit’ command followed by “–message” and an appropriate log message, and finally, the location of your working copy. In this example, the command would be: svn commit –message “added Readme file” C:UsersJessicaDocumentsNew_Project Hit ‘Enter.’ Your changes have now been committed to the repository!

Leave a Comment