如何在远程开发服务器上使用版本控制? [英] How to use version control on a remote development server?

查看:63
本文介绍了如何在远程开发服务器上使用版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个由开发人员和设计师组成的小团队中,负责开发 Web 应用程序,现在我们决定开始使用版本控制.我们有主开发服务器,所有项目都存储在其中,我们通过 ftp 处理它们(但我们有 ssh 访问权限).

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).

问题是,在有人推送提交后更新服务器上的文件的最佳方法是什么,以便可以在浏览器中立即看到所有更改?据我所知,git 存储库应该是裸"的才能接收推送,而且由于它是裸"的 - 它没有工作文件.这是否意味着 git 没有用或者有办法?

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?

在 Mercurial 中,必须在本地应用推送提交才能更改文件.应该通过某种钩子来完成吗?

In Mercurial pushed commit have to be applied locally for files to change. Should it be done through some kind of hooks?

而且我实际上不知道 svn 在这种情况下的表现,从未使用过它.

And I don't actually know how svn behave in this situation, never used it.

解决方案应该易于使用并与 GUI 客户端兼容.

The solution should be easy to use and compatible with GUI clients.

推荐答案

寻找钩子",即当某些特定事件发生时(例如在存储库中拉取变更集时),版本控制软件调用的脚本.该功能在 SVN、GIT、Mercurial、Bazaar 中可用...

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...

我目前在持有 WIP 网站的中央 mercurial 存储库上有一个钩子:当团队中的某个人将他的更改推送到那里时,该网站的测试版本会由钩子脚本自动更新.然后当我们对某个版本感到满意时,我们会使用另一个脚本将该版本移动到测试版网站,以便一些用户可以查看.

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.

这篇关于如何在远程开发服务器上使用版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆