[英]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. 我是一个由开发人员和设计人员组成的小团队,开发Web应用程序,现在我们决定开始使用版本控制。 We have main development server where all projects are stored and we work on them through ftp(but we have ssh access).
我们有主要的开发服务器,其中存储了所有项目,我们通过ftp处理它们(但我们有ssh访问权限)。
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.
据我所知,git存储库应该是'裸'才能接收推送,因为它是'裸' - 它没有工作文件。 Does that mean that git is no use for that or there is way?
这是否意味着git对此没用或有办法?
In Mercurial pushed commit have to be applied locally for files to change. 在Mercurial中,必须在本地应用提交以便更改文件。 Should it be done through some kind of hooks?
它应该通过某种钩子来完成吗?
And I don't actually know how svn behave in this situation, never used it. 我实际上并不知道svn在这种情况下是如何表现的,从未使用它。
The solution should be easy to use and compatible with GUI clients. 该解决方案应易于使用并与GUI客户端兼容。
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...
这个功能在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. 我目前在一个拥有WIP网站的中央mercurial存储库上有一个钩子:当团队中的某个人在那里推送他的更改时,该网站的测试版本会被钩子脚本自动更新。 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.
然后,当我们对某个版本感到满意时,我们会使用另一个脚本将此版本移至测试版网站,以便某些用户可以查看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.