How do I sync all the code in the SVN repository (for development purposes) with the live code I have running in /home/site/public_html/, as in overwrite whatever is in live with the new code from the SVN repo (assume the SVN repo location is in /usr/bin/svn/project, just for the sake of the argument, even though it's probably far from that)?
+2
A:
Just do an svn checkout
or svn export
in /home/site/public_html.
Personally I have a checked out copy on my web server, and the repository is on the same machine. I then have a hook so that on a commit, I perform an svn update
in the live directory, so that committing to the repository immediately makes the change live.
Jon Skeet
2010-07-30 06:53:24
And don't forget to add the appropriate .htaccess (or equivalent) rules to prevent people from navigating into the .svn folder.
Seth
2010-07-30 07:05:21
What type of a rule would that be (that I can add to my existing .htaccess files) - do you have an example?
Crazy Serb
2010-07-30 07:10:18