I need a way to test changes online before publishing them.
So far git can play a role in this from what i read. I have little knowledge when it comes to git so …
the preliminary info is:
1) website domain is: http://www.domain.com
2) the is a dns redirection using the “*” wildcard
*.domain.com => http://www.domain.com
1) I think i should use a development branch … but how can i test that branch live?
2) What link would i use to access that branch and how do i set it up?
I assume you’ve already read some git tutorials, I like to recommend Git Immersion.
You can use simple setup for the beginning – keep two branches – one (master) with stable, tested code and one with the code you develop. Here is a good article describing a good, but full scale git branching model, so you can see how it looks in bigger projects.
It is good to have some automated way of deploying code into the server. When you have one (using some CI tool or scripts which check out the repository, copy necessary files, run the database migrations etc.) it is easy to deploy your application to any location (for example a designated test server). I would not risk testing new code on a production server, but if you are short on money you can do that. Remember to set up the separate copy of the database for development application!
When you stabilize the code and it can be used in the production you merge development branch with master branch.