I’m new to using Subversion and have just set up the following – SVN on a remote server and SVN on a local PC. I have created a repo on the remote server at /repos, then i (svn) imported a live website’s files into that repo. I then checked out (using svn+ssh) a working copy to my local PC, directly into a local LAMP setup under /var/www, so that I can preview any changes i make on a local web server, before committing back to the remote repo. Two questions really – is this a sensible set up for a beginner? Is it ok that I don’t actually have a working copy on the remote server, just the main repo for each site?
Also, how can i use svn:ignore properly to avoid checkout database config files and useless directories like mail, log, tmp etc? I’ve looked at the book and am still not entirely sure, any help appreciated!
svn:ignoreis not used to avoid checking things out, but to avoid checking things in. You should remove those files from your repository, and then set thesvn:ignoreproperty on your working copy so that they will not be inadvertantly checked back in.You can use
svn delete --keep-localon your working copy, and then commit to have the files removed from the repository.As for your setup, you would not want to have a working copy on the remote server; instead, to deploy the files, you would use
svn exportof a known good revision.