What is the best practice for creating a website repository? Is the repository the live on the and does not require moving files from the repo? Or do you need to move files from the server repository to the web server?
What is the best practice for creating a website repository? Is the repository the
Share
Randolpho is correct of course, you don’t want to be working against the live server files.
You have a source control system, the purpose of this is so you can keep track of who changed what when and so you can change it back if you need to and know who to yell at for screwing it up.
You have the web server to serve your content.
And you have a deployment process which is the process of getting the content from source control installed on the web server. Ideally this is not a manual process. Ideally what you want to happen here is that when you want to deploy to the web server, you type a couple words on the command line and
1) The content is pulled from source control
2) It is verified that the content is all there and is going to do what you expect it to
3) The content is moved to the web server and anything that needs to be restarted is restarted
4) A test is done to make sure that the web server is up and that the content it is serving is the content you expect it to be serving.
Automation is a wonderful thing.