Subversion basics

Операция Official client TortoiseSVN
(create new working copy) (*)
svn checkout
(svn co [URL])
  1. Create directory
  2. Navigate it with explorer
  3. Click Right Mouse Button
  4. Choose "SVN Checkout" from pop-up menu
  5. Fill "URL" field and other values
  6. Click OK
(update working copy) (*)
svn update (svn up)
  1. Right Mouse Button
  2. "SVN Update" in pop-up menu
(save changes to repository) (*)
svn commit (svn ci)
  1. Right Mouse Button
  2. "SVN Commit" in pop-up menu
(examine working copy status) (*)
svn status (svn st)
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Check for modification" in pop-up menu
(review changes)
svn diff (svn di)
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Create patch" in pop-up menu
(WC to new repository URL) (*)
svn switch [новый URL] (svn sw)
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Switch" in pop-up menu
  4. Enter new URL
  5. Click OK
(add file/directory to working copy)
svn add [file/dir]
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Add" in pop-up menu
  4. Select files
  5. Click OK
(remove file/dir from WC) (*)
svn remove [file/dir] (delete, del, remove, rm)
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Delete" in pop-up menu
(to create branch/tag, for example) (*)
svn copy [URL1] [URL2] (svn cp)
svn copy \ \
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Branch/Tag" in pop-up menu
  4. Enter new repository URL
  5. Enter commit message
  6. Click OK
(local changes)
svn revert
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Revert" in pop-up menu
(view changelog)
svn log
  1. Right Mouse Button
  2. "TortoiseSVN" in pop-up menu
  3. "Show Log" in pop-up menu
(apply changeset from repository to WC) (*)
svn merge -r N:M SOURCE[@REV] To merge revisions you need to go to a working copy of the branch in which you want to receive the changes, often the trunk. Select Merge... from the context menu.
  1. In the From: field enter the full folder url of the branch or tag containing the changes you want to port into your working copy. You may also click ... to browse the repository and find the desired branch.
  2. Because you are porting a range of revisions from the same branch into your working copy, make sure the Use "From:" URL checkbox is checked.
  3. In the From Revision field enter the initial revision number. This is the revision before the changes you want to merge. Revision numbers are auto-incremented after each commit. You want to start merging the changes before the revision number is auto-incremented. For example, if your log messages look something like this:
    Rev Comments
    39. Working on MyBranch
    38. Working on trunk
    37. Working on MyBranch
    36. Create branch MyBranch
    35. Working on trunk
    34. Working on trunk

    If you now want to merge the changes from MyBranch into the trunk you have to choose 36 as the From Revision. Not 37 as you might think.

    The easiest way to find the revision you need is to click on Show Log, as this will list recent changes with their log comments. Select the revision you require in the Show Log dialog, then click on OK.

  4. In the To Revision field enter the last revision number in the range you want to merge. Often this will be the HEAD revision, although it doesn't need to be - you can just want to merge a single revision.
  5. Click OK to complete the merge.

Official command-line client

Grab it from .

Perfectly documented in Version Control with Subversion. Works on any OS out there. This client will be installed on development and production boxes. Has built-in help for every command (for "svn checkout" - "svn help checkout", and so on).

I strongly recommend this client for starters.


Grab it here:

Popular client for Windows. Implemented as a windows shell extension (you will need to click with right mouse button on everything). Pretty good help file in chm format. With excerpts from The Great Book (Version Control with Subversion).



You can checkout any directory / branch from repository. You can even checkout whole repository (like that: svn co, but beware - "cheap copies" are only cheap in repository, not on your hard drive! And if single branch takes 100Mb, 10 branches will take 1Gb.


update, like almost every operation in SVN, works on current dir recursively. And, like almost every operation, you can explicitly tell it what (and how) you want to update:svn up -r 10 file - update file file to revision 10. You can update to any past revision.


By default it commits current dir recursively. You can explicitly tell what you're going to commit. Before committing you'd better once again review your changes with svn diff, it will help you to write better commit message. This is how I do my commits: svn diff | gview - ; svn ci


There are a lot of letters in stat output. Most popular are M - modified file, A - added file, D - deleted file. Full legend is available here:


Always check output of this operation. If switch fails, you can by mistake commit your changes on wrong branch.


This operation can be done server-side - just put an URL in repository instead of WC path.


This operation can be done on WC, too - just put a WC path instead of URL in repository.


Check Starters Guide.