The following is a very basic walkthrough for creating a Subversion repository for source control. For more information, please see the documentation. Subversion 1.4 should be installed on all department RHEL5 machines.
To create a repository in a folder called svn in your home directory on a CS machine, run:
cd; svnadmin create svn
Create a directory for your project:
svn mkdir file:///your/home/directory/svn/projectname/ -m "Project root for projectname"
Create a directory for the trunk (main work branch) of your code:
svn mkdir file:///your/home/directory/svn/projectname/trunk/ -m "Creating trunk"
Similarly you can (should) create tags/ and branches/ directories.
Import your code into the repository:
svn import /path/to/your/projectcode file:///your/home/directory/svn/projectname/trunk/ -m "Initial import for projectname"
You will now need to check out a new working copy:
svn checkout file:///your/home/directory/svn/projectname/trunk/
This will create a directory named trunk (which you can rename) with a working copy of the project in the repository.
From here you can make changes and use the various svn commands. Use
to get help with commands, or look here for help.
The main commands you will need are:
to update the working copy from the repository.
to put changes in the working copy into the repository.
to list the status of changed files in the working copy.
to add a new file to version control. Status will now show an A next to it. You will need to commit to actually put it in the repository.
You can access your repository from outside the CS network over ssh.
Replace file:// in the above commands with svn+ssh://email@example.com
For example, to get a working copy of your code on your home machine:
svn checkout svn+ssh://firstname.lastname@example.org/your/home/directory/svn/projectname/trunk/
Within the working copy you can use commands (e.g. svn commit) the same as above.