How to consolidate multiple bitbucket workspaces and respective repositories under one workspace

Shankar Asam {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2022

Hi All,

We have multiple Bitbucket cloud work spaces with hundreds of repositories. We want to consolidate all the workspaces into a single/one workspace without loosing the data (metadata, commits, PR etc) from source to target.  Are there any ways to do it? Can it be possible via automation scripts ?

Thanks

Shankar

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2022

Hi Shankar,

It is possible to transfer a repository to a different workspace. All commits and metadata get transferred, except for Deployment variables. In case you are using Pipelines and have Deployment variables in any of these repos, please make a note of them so you can recreate them after transfer.

You can read more details on how to transfer a repository here:

If you transfer a repository, its URL is going to change. Users who have a clone of repos you are going to transfer on their local machine will need to update the remote URL in each clone. Details are provided in the last section of the page I shared.

Please note that repositories with Git LFS cannot be transferred. In case you want to transfer a repo with Git LFS, please check the workaround provided on the following page (as mentioned on that page, metadata cannot be copied over for these repos):

I'm afraid that it is not possible to do a bulk transfer and that we don't have an API endpoint to automate this. The operation needs to be done through the UI for each repo, and the transfer request needs to be accepted by an admin of the workspace you are transferring to.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events