Merge code across two Azure DevOps Team Projects

965 Views Asked by At

We have two separate team projects (Let's call them Staging and Prod) within our single Azure DevOps Organisation. Currently, both team project code bases are nearly identical. However, we've decided to use Staging to develop and test all of our changes and once successfully verified, we promote/merge the code across to the Prod team project.

For example:

[[ Staging Team Project ]]
File A - v1.1 - (latest changes, tested, verified and ready for promotion to Prod.)
File B - v3.2 - (latest changes, tested, verified and ready for promotion to Prod.)


[[ Prod Team Project ]]
File A - v1.0 - (last release currently in Live.)
File B - v3.1 - (last release currently in Live.)

Using the above as an example, is there a way to carry out this code promotion/merge of the two files from the Staging team project to Prod, or is our only option to perform a manual merge externally, using something like Beyond Compare and then check the merge into the Prod repository?

1

There are 1 best solutions below

2
On

Pull request can be created between branches in same repo or from forked repo, but cannot be created between different repos in two projects.

As an alternative, you can create a new branch temp based on Prod repo branch, replace the files(you can checkout/checkin on local machine to replace, or directly upload files to replace on Azure DevOps UI), then create a pull request from temp branch to Prod branch to validate and merge accordingly.