Hello,
is there a way to prevent an accidental deletion of a branch, e.g. when merging a Pull Request and someone clicks on "Delete source branch on merge"?
It is about Bitbucket Cloud.
Thank you
Hi Jaroslav,
Can you check Tim's solution ,it will do the following :
Thanks
Adel
Unfortunately, Tim's solution is for Bitbucket Server.
For Bitbucket Cloud, however, you can use branch permissions to prevent users from deleting the branch in question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tom,
there is a new option under custom settings: "Deleting this branch is not allowed"
I swear two days ago it wasn't there :-)
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not seeing an option to prevent deletion of master or a branch "type" (like Development)...
https://i.imgur.com/75VVQab.png
It's very easy in a git GUI or CLI to accidentally select to delete the remote branch or mistype an option.
I'm not sure a plugin is feasible without knowing exactly what it's seeing or doing in its code execution (privacy & security issue), and also an incompatibility or update can cause disruption if we're relying on it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, just add a user to write permissions and then you will get checkboxes for controlling deletion and rewriting history.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's a bug in Jira! If no user is on the write access field you won't see the options to prevent the branch to be deleted. Add a user, check/uncheck the option, remove the user and save.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just a thought/idea, you may want to solve this problem at a lower layer, in `git` you can use an update-hook and simply prevent the deletion. This should live with the repo and protect it where it sits Bitbucket cloud or server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hooks are not included in pushes or pulls, though, and users do not have direct filesystem access to the .git directory in a repo on Bitbucket Cloud.
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.
Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.
Learn moreOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.