Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to clone master branch in cloud itself?

Rahul Malgujar May 10, 2019

I want to clone master branch not in local but in bitbucket only and lock it so that no one can make changes to it because the project is going to release soon and complete code will get freeze, and again I want to create a new branch from master for the next version of my project.

So please help regarding this. Thanks in advance.

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2019

Hello Rahul and welcome to the Community!

If you’re wanting to clone a Bitbucket cloud repo into another Bitbucket cloud repo then you’ll need to clone the repo locally first, create the repo within Bitbucket cloud and submit your cloned repo. There is currently no feature to clone within cloud itself.

Ideally, your workflow would include modifying permissions to lock down the master to prevent any new changes. This method would allow you to revoke any admin/write permissions to developers and lock them into read-only. Once your release is completed you can then re-adjust the permissions back. There is an article which covers more about permissions at Grant repository access to users and groups.

If you wanted to capture which permissions are present set before adjusting to read-only you could use the REST API to GET the permission values prior to the change. While you can’t currently update permissions via the v2 REST API, you can use them for auditing and recording purposes.

I hope this proves helpful and you’re able to lock down your master branch as needed.

Regards,
Stephen Sifers

Rahul Malgujar May 14, 2019

Thanks Stephen the response is very helpful.

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events