Hey Mark, I don’t know how comfortable you are with the concepts, so let me start from the beginning.
You need two directories with Subversion: the repository and the working copy.
The repository is the database that holds all the files and their revisions, log changes, etc. The repository is in a format that’s not meant to be edited directly; you only use Subversion to interact with it.
The working copy is where you do most of your work. Working copies are just plain directories with your files, except that they have a hidden .svn directory within each directory. The .svn directory contains all the data necessary to sync your working copy with its matching repository.
To start with Subversion, you first create a repository. If you have the command-line files from Collabnet, try this command:
svnadmin create ~/svn
That creates an empty repository in a folder called svn in your Mac’s home directory. (You’re using a Mac, correct?) If you’d prefer, you can put the repository anywhere else; just make sure to substitute the correct path in the rest of these instructions.
Next, you need to create a working copy. Type this:
svn co file:///Users/Mark/svn ~/wc
(Substitute the appropriate path to the repository.) When you do, Subversion should respond with this:
Checked out revision 0.
Next, you can move into the ~/wc directory and make any changes you want. One question you should answer very quickly is how you want to structure your repository. Here are some questions:
* Do you want to put multiple projects in one repository, or make one repository for each project? (I’ve done the former so far, but I’m not confident that that’s the best way.)
* How do you layout your file structure? Subversion recommends creating three folders: trunk, branches, and tags. I add a fourth folder called resources. trunk holds my final, ready-for-publication pages and sites. resources holds things like PSDs, copy from clients that usually comes in Microsoft Word or some other ugly format, notes, etc. branches and tags hold copies of trunk at various stages of development; you don’t need to worry about that at first.
To create directories, type:
svn mkdir trunk
svn mkdir branches
etc.
To add files, just get it into the working copy using any method that works for you (Finder, saving it with Dreamweaver, etc.). Next, you need to tell Subversion to process a new file:
svn add trunk/foo.html
When you modify a file, you don’t need to tell Subversion about it. It’ll notice automatically.
When you’ve finished an editing session, you’ll want to commit your changes. I generally commit when I’ve made all the edits to accomplish a particular task. To commit your changes:
svn ci
You’ll be asked to type a log message. This is a note to explain to yourself what you did and why. Once you save and quit, the files will get uploaded to the repository, along with your log message.
Once you understand the concepts, working with the GUIs becomes much easier. Things to note:
* You have to tell Subversion when you add or delete stuff, or move things around, but not when you modify files that already exist.
* Subversion is extremely powerful, but you don’t need to worry about that for now. If you can get started just making changes to a working copy and then committing it, you will begin generating the logs and other features that make Subversion powerful. That way, they’ll be there for you when you’re ready to venture into the next step.
* If you’re not using Subversion 1.5, you really should be. It adds some features that will help you out later on.
If you need more help, the Subversion Book is really good. It’s written for advanced beginners, which is probably what I would call you when it comes to version control.
Of course, I’d love to help if possible, also. Friends don’t let friends keep multiple copies of files.
Take care!