简体   繁体   English

如何在远程开发服务器上使用版本控制?

[英]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. 然后,当我们对某个版本感到满意时,我们会使用另一个脚本将此版本移至测试版网站,以便某些用户可以查看。

There's no need for a working tree to have web access to your repo. 没有必要使用工作树来访问您的仓库。 See docs on GitWeb . 请参阅GitWeb上的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 具有多个服务器的远程站点中的开发和版本控制工作流 - Development and version control workflow in a remote site with several servers Web开发的控制版本 - Control Version for Web Development 如何使用git从Windows开发IDE远程控制Linux文件夹的版本? - How can I use git to version-control linux folder from windows development IDE remotely? 使用Git进行版本控制和将更改写入远程服务器 - Using Git for both version control and writing changes to remote server 将现有的NetBeans项目移动到远程服务器并将其置于版本控制下 - Move an existing NetBeans project to a remote server and place it under version control 版本控制:一台远程服务器上的中央存储库和分支 - Version Control: Central repository and Branches on ONE remote server 如何 git pull 在我的开发远程服务器上的特定分支? - How to git pull a specific branch on my development remote server? 如何集成服务器文件的版本控制? - How to integrate version control for server files? 如何对不应推送到远程存储库的控制文件进行版本控制? - How to version control files which shouldn't be pushed to a remote repository? 如何使用 git 控制修改以使用远程服务器和本地服务器 - How to control modifications to work with a remote server and a local server using git
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM