Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to mirror a pull request from one BitBucket repository to another

sTEPHEN Burrows
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2019

Hi,

 

We are splitting an existing large BitBucket repo up into multiple smaller repos which will each contain a subset if the source repo.

 

We doa mirror clone followed bya  mirror push and expect pull requests to be migrated from source repo to target repo.

We executed the following commands, but push --mirror of pull requests fails.

 

Is it possible toclone mirror pull requests from one BitBucket repo to another using the following command sequence ?

 

mkdir target-repo.git

cd target-repo.git

git --bare init

cd ..

git clone --mirror source-repo,git

cd source repo.git

gut push --mirror ../target-repo.git

cd ..

git clone target-repo.git

... apply changes

git add .

git commit -m "apply changes"

git push

cd ../target-repo.git

git remote add origin http://new-target-bitbucket-remote

git push -- mirror origin

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2019

Hi Stephen,

Pull requests can not be migrated or cloned, as that's not content but metadata, they need to be recreated manually. Alternatively, you can use the Bitbucket Cloud API.

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events