User Tools

Site Tools


scm:svn:commands

SVN commands

svn checkout / co

Example

svn co https://svn.net/repos/example/trunk htdocs

svn update / up

Example

svn update htdocs

svn commit / ci

Example

svn ci -m "updated readme and version number"

svn add

Example

svn add app/controller.php

svn rm

Example

svn rm vendor/scripts/

svn revert

Undo local changes

Example

svn revert config/config.yml

svn copy

Example

Create a new release tag from the trunk

svn copy -m "release 1.1.2" https://svn.net/repos/example/trunk https://svn.net/repos/example/tags/REL-1.1.2

svn switch

Example

svn switch https://svn.net/repos/example/tags/REL-1.2.4

svn info

Example

svn info

svn status

Example

svn info

svn propedit

Example

Edit the svn:ignore pattern

svn propedit svn:ignore .

Rename a repository

There's no command to rename a repo directly, but the following procedure does the trick.

  1. svnadmin create /path/to/new/repository/<new-repo-name>
  2. svnadmin dump /the/path/to/old/repository/<old-repo-name> > old-repo.dump
  3. svnadmin load /the/path/to/new/repository/<new-repo-name> < old-repo.dump
The new repository must be completely empty before the “load” operation or the command will fail with strange error messages.
/srv/wiki.niwos.com/data/pages/scm/svn/commands.txt · Last modified: 2009/08/15 12:14 (external edit)