简体   繁体   English

SVN,Git,两步提交

[英]Two Step Commit with SVN, Git,

I would like to set up a version control system in which developers can push/commit they changes to one repository. 我想建立一个版本控制系统,开发人员可以在其中将更改提交/提交到一个存储库。 Our testing department can pull those changes and test them. 我们的测试部门可以拉出这些更改并进行测试。 After those changes have been approved by the testing department, they would be committed to a second repository, ready for release. 在测试部门批准了这些更改之后,它们将被提交到第二个存储库,准备发布。

I know we could use branches for this, but there are a lots of micro-changes and creating a branch for each of them seems like an overhead to me. 我知道我们可以为此使用分支,但是有很多微变更,为每个变更创建一个分支对我来说似乎是一项开销。

So in short, I need a system where each commit acts like a branch and can be individually merged to a master repository. 简而言之,我需要一个系统,其中每个提交的行为都像一个分支,并且可以单独合并到主存储库中。

Note: Git's index does not count, since it exists only locally and can not be accessed by the testing department. 注意:Git的索引不计算在内,因为它仅在本地存在,并且测试部门无法访问。

With a distributed repo like Git, you don't need branches, you need multiple repos, one acting as a gatekeeper from the other. 使用像Git这样的分布式存储库,您不需要分支,需要多个存储库,一个存储库可充当另一个存储库的守护者。

Whenever you push to the gatekeeper repo, that repo triggers through a post-receive hook the tests. 每当您推送到网守存储库时,该存储库都会通过接收后挂钩测试触发。
If those tests pass, it pushed to the final repo which acts as the blessed referential for all developers to pull from. 如果这些测试通过,它将推送到最终的回购库,该库将成为所有开发人员可以借鉴的有福的参考。

This does not test "by commit", but for each set of commits pushed. 这不会测试“按提交”,而是针对每组提交的提交。

I mentioned that before when the final repo was actually an svn one . 我提到过,在最终回购实际上是svn之前
I also mentioned it for tests or for private builds . 我还提到了它用于测试或私人构建

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM