简体   繁体   English

Azure DevOps:跨存储库拉取请求?

[英]Azure DevOps : Pull Request across the Repositories?

I am not sure if people usually maintain the Production branch and other Development/Developer specific branches in the same Repository, but I want to have separate Production only Repository.我不确定人们是否通常在同一个存储库中维护生产分支和其他开发/开发人员特定的分支,但我想拥有单独的生产存储库。

Now, in that case, how do I keep updating the code in my Production repository/branch?现在,在这种情况下,我如何不断更新我的生产存储库/分支中的代码?

If it is the same Repository, then I can create a Pull request across branches and keep the branch / code up to date or in sync.如果它是同一个 Repository,那么我可以创建跨分支的 Pull 请求并使分支/代码保持最新或同步。

But, how do I keep pushing the new code modifications to the branch in a different Repository?但是,我如何不断将新代码修改推送到不同存储库中的分支? For the initial copy, there is "Clone" feature, but I am not aware if pull is also possible.对于初始副本,有“克隆”功能,但我不知道是否也可以拉。

Azure DevOps : Pull Request across the Repositories? Azure DevOps:跨存储库拉取请求?

You can do such operation in Azure Devops.您可以在 Azure Devops 中执行此类操作。 BUT , the prerequisite is there must exist Fork relationship between current( Repos-A ) and target( Repos-B ) repos.但是前提是当前( Repos-A )和目标( Repos-B )repos 之间必须存在Fork关系。

In another word, one repos must be forked from another repos if you want to create pull request across repos.换句话说,如果您想跨存储库创建拉取请求,则必须另一个存储库分叉一个存储库。

在此处输入图片说明

At this time, you will has option to choose another repos/project while you creating the Pull request.此时,您可以在创建拉取请求时选择另一个存储库/项目。

在此处输入图片说明


As normal, we does not very recommend such operation.正常情况下,我们不太推荐这样的操作。 In this doc , we described some scenario:在本文档中,我们描述了一些场景:

For a very small team (2-5 developers), we recommend working in a single repo.对于非常小的团队(2-5 名开发人员),我们建议在单个存储库中工作。 Everyone should work in topic branches, and master should be protected with branch policies.每个人都应该在主题分支中工作,并且 master 应该受到分支策略的保护。 As your team grows larger, you may find yourself outgrowing this arrangement and prefer to switch to a forking workflow.随着您的团队越来越大,您可能会发现自己超出了这种安排,而更喜欢切换到分叉工作流程。

If your repository has a large number of casual or infrequent committers (similar to an open source project), we recommend the forking workflow.如果您的存储库有大量临时或不频繁的提交者(类似于开源项目),我们建议使用分叉工作流。 Typically only core contributors to your project have direct commit rights into your repository.通常,只有项目的核心贡献者才能直接提交到您的存储库。 You should ask collaborators from outside this core set of people to work from a fork of the repository.您应该要求来自这组核心人员之外的合作者从存储库的分支中工作。 This will isolate their changes from yours until you've had a chance to vet the work.这会将他们的更改与您的更改隔离开来,直到您有机会审查工作。

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

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