Instructions on using Subversion (SVN) to manage projects, starting from scratch.

We assume the userid is foo for the example below

Background: There is a repository, that stores all of your code and changes, which consists of a nested set of directories; you only interact with the repository through svn commands. A local working copy exists for projects that you have “checked out” of the repository. Although you may check out projects anywhere you have permission, it is good practice to keep them all in one place. Also, please note that svn works by taking differences of files, and is space efficient for ascii (text) files. Be very careful with binary files! In general, svn will save a new copy of the binary file each time it is changed, so you shouldn’t add binary files to the repository (e.g. .doc, .ppt, .pdf, .jpg, etc.) if you plan to change them often.

1) Create a repository directory

2) Create a working directory

3) Establish a project called newproj

4) Establish a working copy of the new project

5) Add directories and files to the working copy

6) Commit the working copy of the project to the repository

7) Add/revise files

8) Updating working copies

Notes

  ! $Date$
  ! $Revision$
  ! $Author$
  ! $Id$

  and then after committing, the keywords are expanded automatically:

  ! $Date: 2008–02–25 16:47:16 −0800 (Mon, 25 Feb 2008) $
  ! $Revision: 36 $
  ! $Author: hakim $
  ! $Id: O3DATA.f90 36 2008–02–26 00:47:16Z hakim $

  • how to remove a file from the repo without deleting the local copy: svn rm - -keep-local filename
  • Last edited: 7 July 2015