Subversion

From RHLUG

Jump to: navigation, search

svn is a command line tool that can do everything needed when working with subversion repositories. To use the built in help, run

$ svn help

If you need advanced help on a specific Subversion command, run

$ svn help <command>

Some basic commands are:

[edit] Checkout

Doing a check creates a directory called myrepos in whichever folder you ran the command. A terminal, by default, starts in your home directory, which is a fine place to checkout a repository.

$ svn checkout http://example.com/svn/myrepos

[edit] Update

When run from within a folder under version control an update will grab the newest updates for files from the repository. Following the format of the previous example, to get the newest version of myrepos, you would open a terminal and type:

$ cd myrepos $ svn update

[edit] Commit

When run from within a directory under version control a commit sends changes you have made to the server so other people can access them. The -m option specifies that the next argument is the message to write into the Subversion log. For example:

$ svn commit -m "Fixed the bug in foo.c, proper values are now returned"
Personal tools