SVN Reference

Page 39

Basic Usage

Adding Adding Adding Adding

-m "Initial import" mytree/foo.c mytree/bar.c mytree/subdir mytree/subdir/quux.h

Committed revision 1. The previous example copied the contents of directory mytree under the directory some/ project in the repository: $ svn list file:///usr/local/svn/newrepos/some/project bar.c foo.c subdir/ Note that after the import is finished, the original tree is not converted into a working copy. To start working, you still need to svn checkout a fresh working copy of the tree.

Recommended repository layout While Subversion's flexibility allows you to layout your repository in any way that you choose, we recommend that you create a trunk directory to hold the “main line” of development, a branches directory to contain branch copies, and a tags directory to contain tag copies, for example: $ svn list file:///usr/local/svn/repos /trunk /branches /tags You'll learn more about tags and branches in Chapter 4, Branching and Merging. For details and how to set up multiple projects, see the section called “Repository Layout” and the section called “Planning Your Repository Organization” to read more about “project roots”.

Initial Checkout Most of the time, you will start using a Subversion repository by doing a checkout of your project. Checking out a repository creates a “working copy” of it on your local machine. This copy contains the HEAD (latest revision) of the Subversion repository that you specify on the command line: $ svn checkout http://svn.collab.net/repos/svn/trunk A trunk/Makefile.in A trunk/ac-helpers A trunk/ac-helpers/install.sh A trunk/ac-helpers/install-sh A trunk/build.conf … Checked out revision 8810.

17


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.