How to use version control on a remote development server?
I’m in a small team of developers and designers, developing web applications and now we decided to start using version control. We have main development server where all projects are stored and we work on them through ftp(but we have ssh access).
The questions is, what is the best way to update files on a server after someone pushed a commit on it, so all the changes could be instantly seen in a browser?
As far as I know a git repository should be ‘bare’ to be able receive push’s, and since it’s ‘bare’ – it has no working files. Does that mean that git is no use for that or there is way?
In Mercurial pushed commit have to be applied locally for files to change. Should it be done through some kind of hooks?
And I don’t actually know how svn behave in this situation, never used it.
The solution should be easy to use and compatible with GUI clients.
2 Solutions collect form web for “How to use version control on a remote development server?”
Look for “hooks”, that are scripts called by your version control software when some specific events occurs, like when a changeset has been pulled in the repository. That feature is available in SVN, GIT, Mercurial, Bazaar…
I currently have a hook on a central mercurial repository holding a WIP website : when someone of the team push his changes there, a test version of the website is updated automatically by the hook script. Then when we’re satisfied with a version, we use another script to move this version to the beta website, that some users will be able to check.
There’s no need for a working tree to have web access to your repo. See docs on GitWeb.