2

We got 4 separate repositories. Dev, QA, UAT and Prod in Bitbucket Cloud.

enter image description here

Now we need to add another repo between UAT and Prod. Which will be pulling changes from UAT.

Therefore, I forked UAT and created new repo called Preprod.

But when i try to create a pull request from UAT, I can't select Prepod as target. How do i achieve my requirement ?

enter image description here

ChamingaD
  • 2,908
  • 8
  • 35
  • 58
  • Have you get the answer which helps you solve the problem? If yes, you can mark the answer. And it will also benefit other members who meet similar questions. – Marina Liu Aug 06 '18 at 06:27
  • @ChamingaD, How about this issue? Could you get useful information from Marina's suggestion? – Jack Zhai Aug 23 '18 at 15:02

2 Answers2

0

Another approach would be to avoid forking:

  • clone UAT as a bare repo
  • make a new empty Preprod repo on BitBucket Cloud
  • push --mirror UAT to it

See "Mirroring a repository" (here explained in a GitHub context, but the same idea applies)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • We will be doing frequent pulls from UAT to Preprod. So by creating a mirror, will it appear on pull request target list ? – ChamingaD Aug 03 '18 at 05:05
  • @ChamingaD Not sure (to be tested). That was requested before (https://mail.gnome.org/archives/desktop-devel-list/2016-February/msg00054.html) If not, you would need to push your branch to Preprod, and make an intra-repo PR from within Preprod. – VonC Aug 03 '18 at 05:11
0

For now, bitbucket does not support the feature to create pull request from original repo to fork repo (only the opposite way is supported: pull request to merge changes from fork repo to original repo).

And I create an issue Enable to create pull request from original repo to fork repo to suggest this feature, you can follow up.

The workaround for now is merging changes from original repo to fork repo locally and then push to the forked repo. Detail steps as below (such as merge the changes from UAT master branch to Preprod master branch):

#In the local Preprod repo
git checkout master
git remote add upstream <URL for the UAT repo>
git pull upstream master
#Commit conflict files if there has
git push origin master

Now in the Preprod repo master branch, it contains latest changes from UAT master branch.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74