2
votes

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
Why do you want to do that? It's a weird thing to want to do. You could fork your repo and do PRs to and from the fork, but I'd recommend that you just keep all the branches in the same repo unless you have a really compelling reason to do otherwise. - Daniel Mann

1 Answers

4
votes

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.

enter image description here

At this time, you will has option to choose another repos/project while you creating the Pull request.

enter image description here


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.