Bootstrap FreeKB - Subversion (Version Control) - svn checkout command
Subversion (Version Control) - svn checkout command


This assumes you have Subversion installed on your local PC. These examples are based on Linux.

The svn checkout (or svn co for short) command can be used to check out files from one of your Subversion repositories. For example, let's say http://example.com/svn/repo/testing is a repository of files being version controlled by Subversion. You can check out the repository. 

svn co http://example.com/svn/repo/testing

 

When you do not provide a username and password, you will be prompted to authenticate. The --username and --password options can be used on the command line to authenticate. If you don't know the username and password, refer to configuring basic authentication for Subversion.

svn co http://example.com/svn/repo/testing --username=johndoe --password=secret

 

Be aware that if there is an exclamation point in the password, the exclamation point will need to be escaped.

svn co http://example.com/svn/repo/testing --username=johndoe --password=secret\!

 

When you do not specify the target directory, the working copy of the repository will be created in your present working directory. In this example, a directory named "testing" will be created in the present working directory.

testing/

 

Often, it is preferred to define the name of the directory on your local PC that will contain the working copy of the respository.

svn co http://example.com/svn/repo/testing /tmp/SVN

 

You can then modify the files locally. Once you are ready to commit the updated file back into the master Subversion repository, you would svn commit the file.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 746345 in the box below so that we can be sure you are a human.