简体   繁体   English

Git Integration Manager工作流 - 一个或多个存储库?

[英]Git Integration Manager Workflow — one or multiple repositories?

I've read about the Integration Manager Workflow , and it looks very suitable for our development process (one lead developer for the project, who reviews the work of fellow developers before it's committed to the project's repository). 我已经阅读了有关Integration Manager工作流的内容 ,它看起来非常适合我们的开发过程(该项目的一位主要开发人员,在开发人员致力于项目存储库之前审查其他开发人员的工作)。

However, one thing is unclear to me. 但是,有一件事我不清楚。 In this visualization from the Pro Git book it appears as though each developer has his own (remote) repository to push to: 在Pro Git书的这个可视化中,似乎每个开发人员都有自己的(远程)存储库来推送到:

在此输入图像描述

In this chapter (section "Private Small Team"), though, they seem to be using branches to achieve the same kind of workflow. 但是,在本章 (“私人小团队” 节)中,他们似乎正在使用分支来实现相同类型的工作流程。

Is this correct? 它是否正确? Which tactic should we use; 我们应该使用哪种策略; branches or multiple repositories? 分支机构或多个存储库? I'm guessing it's harder to maintain a timeline of commits if you pull work in from a different repository? 我猜想如果你从不同的存储库中提取工作,维护提交的时间表会更难?

You can use the workflow you linked to but it adds a little more overhead. 您可以使用链接到的工作流程,但会增加一些开销。 Biggest advantage is that you can work asynchronously and only need access to the server. 最大的优点是您可以异步工作,只需要访问服务器。

You don't have to use public and private repos though. 您不必使用公共和私人回购。 You can still have a pull based workflow if you have access to the other devs repositories, where the devs commit to their local repos and you pull from them. 如果您可以访问其他开发人员存储库,那么您仍然可以拥有基于拉取的工作流,其中开发人员提交他们的本地存储库并从中提取。

So for example. 所以举个例子。 Say dev A is working on branch featureA. 说dev A正在开发分支featureA。 He commits to his local branch featureA and lets you know "feature A is ready now, you can pull from me". 他致力于他当地的分支功能A并让你知道“功能A现在准备就绪,你可以从我这里拉”。 Here you could setup his repository as a remote like "git remote add devA /path/to/devA/repo.git" and just git pull devA featureA (or fetch first, check the code and then merge). 在这里,您可以将其存储库设置为远程,如“git remote add devA /path/to/devA/repo.git”,然后只需git pull devA featureA(或首先获取,检查代码然后合并)。

在此输入图像描述

This of course assumes that you have access to their repositories via eg the network, ssh or http. 这当然假设您可以通过网络,ssh或http访问其存储库。

This question has been around for a while but the approach given in the question is a valid one. 这个问题已经存在了一段时间,但问题中给出的方法是有效的。 It's called the Forking Workflow . 它被称为分叉工作流程 Well, it's very similar to the one above and seems to match it in intent and purpose but at least there's a nice writeup that should clarify the strategy. 嗯,它与上面的那个非常相似,似乎在意图和目的上匹配它,但至少有一个很好的写作应该澄清策略。

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

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