What's the best practice for developing a website repository? May be the repository the survive the and doesn't require moving files in the repo? Or must you move files in the server repository towards the web server?

Never, ever prevent live server files.

Check into and from source control from the local copy and make a deployment package for upload for your server.

Randolpho is correct obviously, you won't want to work from the live server files.

You've got a source control system, the objective of this really is to help you keep an eye on who transformed what when which means you can alter it back if you want to and know who to yell at for messing up.

You will find the web server for everyone your articles.

And you've got a deployment process the procedure for obtaining the content from source control installed on the internet server. Ideally this isn't a manual process. Ideally what you would like to occur here's that when you wish to deploy towards the web server, you type a few words around the command line and

1) This content is drawn from source control

2) It's verified the submissions are all there and can do that which you expect it to

3) This content is gone to live in the net server and anything that should be restarted is restarted

4) An evaluation is performed to make certain the web server expires which this content it's serving may be the content you anticipate so that it is serving.

Automation is an excellent factor.

  1. 'import' your internet root towards the svn
  2. remove your webroot
  3. 'checkout' the svn for your webroot.

Afterward you can easily 'commit' whilst in the webroot to commit your changes.

http://aymanh.com/subversion-a-quick-tutorial

http://world wide web.abbeyworkshop.com/howto/misc/svn01/

Your internet server can serve pages which come from the Subversion checkout, basically using svn like a deployment tool.

First setup a Subversion repository as always. Only the usual, common repository layout with trunk and tags a minimum of. You may curently have a current repository. Do your development and sign in your site code. Produce a tag for that first version.

Then on the internet server, take a look at a duplicate from the appropriate version. For instance, compact disc /path/to/web/root/folder &lifier&lifier svn co path_to_repository/tags/1. .

Let us say you improve your site and sign in the alterations. Once the update is able to go live, once more produce a tag for this. On the internet server, change to the brand new version by doing e.g. compact disc /path/to/web/root/folder &lifier&lifier svn sw path_to_repository/tags/1.1

Observe that this can obviously litter your internet root with .svn sites. This might be considered a problem, based on what you are implementing. For my sites, it's rarely an issue (I ensure they are protected via .htaccess).

The concept is you do your development on development machines and just login towards the web server following the new tag is prepared and you are prepared to switch the net server towards the latest version.