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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.