Azure DevOps : Pull Request across the Repositories?

六月ゝ 毕业季﹏ 提交于 2020-03-25 19:04:34

问题


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.

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.


回答1:


Azure DevOps : Pull Request across the Repositories?

You can do such operation in Azure Devops. BUT, the prerequisite is there must exist Fork relationship between current(Repos-A) and target(Repos-B) repos.

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. Everyone should work in topic branches, and master should be protected with branch policies. 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.



来源:https://stackoverflow.com/questions/59590177/azure-devops-pull-request-across-the-repositories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!