X
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 61,131 times.
Learn more...
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
-
1
-
2To 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:\Users\Jessica\Documents\New_ProjectAdvertisement
-
3Check in the 'Documents' folder. You will see a new folder called 'New Project.'
-
4This folder contains some new files. Do not delete or modify any of these files.
-
5Now 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:\Users\Jessica\Documents\New_Project Hit 'Enter.'
-
6When you check your working copy, you will notice copies of all the files from your repository.
-
7Now 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:\Users\Jessica\Documents\New_Project Hit 'Enter.' Your changes have now been committed to the repository!
Advertisement
Things You'll Need
- Make sure you have Subversion installed. Free binaries are available to download from http://www.wandisco.com/subversion/download
About This Article
Advertisement