本地、测试和生产版本控制
我对版本控制非常陌生,如果可能的话,我希望获得一些帮助。
我想知道,这是控制 3 个开发环境的最佳方式: 开发 >测试>生产
- 开发(本地主机环境)- 所有开发的工作都在上传之前在这里完成
- 从事特定项目的每个人都应该有此文件夹的克隆(如果可能的话,每个协作者及其用户),并且用户的每个推送都将发送到此处的开发文件夹。
- 测试 - 应该是一个克隆文件夹,其中包含开发推送的数据,并使用 ftp 或任何协议自动与子域
测试
同步。 - Production 是发布稳定更新的实时站点。
- 它应该是测试的克隆,还是推送测试时应在此处上传数据?
当用户推送的文件与其他用户 1 分钟前推送的文件不同时,会出现冲突问题吗?当然,任务可以分开,每个人都做某些事情,但如果不是,如果 X 提交了 commit.php 而 Y 也在 1 分钟前提交了 Submit.php 怎么办?
什么版本控制软件最适合?
I am very new to version control and I would like some help if possible.
I was wondering, which is the best way of controlling 3 development environments: Development > Testing > Production
- Development(Localhost environment) - all the work developed is being done here before any upload
- Every1 working on the specific project should have a clone of this folder (each collaborator with its user, if possible) and every push by user will be sent here, to development folder.
- Testing - Should be a clone folder that contains data pushed by Development and which is automatically synced with the subdomain
testing
using ftp, or whatever protocol. - Production is the live site, where the stable updates are released.
- Should it be a clone of Testing, or testing upon push should upload the data here?
How about conflict problems when a user pushes a file/s different from what other user pushed 1 minute ago? Of course there can be the task separation and each to do certain things but what if not, what if X commits submit.php and Y also commits submit.php 1 minute before?
What version control software will be most suited?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您将其翻译为 DVCS(分布式版本控制系统 ), <一href="https://stackoverflow.com/questions/995636/popularity-of-git-mercurial-bazaar-vs-which-to-recommend/995799#995799">像 Git 一样,你的每个“文件夹" 可以是代码存储库的实际克隆。
这意味着您:
development
”存储库development
”推送到“testing
”(或者更好)然而,有一个关于“测试”的任务负责拉动“开发
”,并在检测到任何新提交测试” 推送时触发一些测试code>'(如果测试正常)到生产环境
另外,您不会接受对远程存储库的非快进更新,这意味着任何冲突都会首先在本地解决,然后再推送。
If you translate that in term of a DVCS (Distributed Version Control System), like Git, each of your "folders" can be an actual clone of your code repository.
That means that you:
development
' repodevelopment
' to 'testing
' (or better yet, have a task on 'testing' in charge of pulling 'development
' and trigger some tests if any new commit is detectedtesting
' (if tests are ok) to productionPlus you wouldn't accept non fast-forward update to remote repo, which means any conflict would be first solved locally, before being pushed.
如果您有一个大型团队,Git 非常棒,但恕我直言,Subversion (SVN) 更容易学习,并且仍然提供了一组很好的核心功能来满足您的需求。处理上面提到的需求的常见方法是创建一个包含三个文件夹的 Subversion 存储库,分别称为“trunk”、“branches”和“tags”。
基本上,所有这些子目录都是您的主干的分支,您可以通过 SVN 导出命令创建它们。
Git is awesome if you have a large team, but IMHO Subversion (SVN) is easier to learn and still provides a good set of core features that will handle your requirements. A common approach to handling the needs you mention above is to create a subversion repository with three folders called 'trunk', 'branches' and 'tags'.
Basically, all these subdirectories are forks off of your trunk which you can create via the SVN export command.