本地、测试和生产版本控制

发布于 2025-01-03 22:07:20 字数 641 浏览 2 评论 0原文

我对版本控制非常陌生,如果可能的话,我希望获得一些帮助。

我想知道,这是控制 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

〆一缕阳光ご 2025-01-10 22:07:20

如果您将其翻译为 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:

  • would push from your local development to 'development' repo
  • would push from 'development' to 'testing' (or better yet, have a task on 'testing' in charge of pulling 'development' and trigger some tests if any new commit is detected
  • would push from 'testing' (if tests are ok) to production

Plus you wouldn't accept non fast-forward update to remote repo, which means any conflict would be first solved locally, before being pushed.

云巢 2025-01-10 22:07:20

如果您有一个大型团队,Git 非常棒,但恕我直言,Subversion (SVN) 更容易学习,并且仍然提供了一组很好的核心功能来满足您的需求。处理上面提到的需求的常见方法是创建一个包含三个文件夹的 Subversion 存储库,分别称为“trunk”、“branches”和“tags”。

  • 开发:发生在“trunk”子目录中。
  • 预发布测试:发生在“branches”的智能命名子目录中,例如“RC1-test”
  • 稳定版本维护:发生在“tags”的版本标记子目录中',例如'2.0'

基本上,所有这些子目录都是您的主干的分支,您可以通过 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'.

  • Development: Happens in the 'trunk' subdirectory.
  • Pre-release testing: Happens in an intelligently named subdirectory of 'branches' e.g. 'RC1-test'
  • Stable-release maintenance: Happens in a version-tagged subdirectory of 'tags', e.g. '2.0'

Basically, all these subdirectories are forks off of your trunk which you can create via the SVN export command.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文