Automatically delete branch after merging a pull request

When I click "Merge" in a pull request, a dialog gives me the option to delete the source branch: 

image2016-10-4 17:28:43.png

I realise this is "sticky" – Bitbucket will remember what I ticked last time. However, it's easy to untick the box and then forget to tick it again and, before you know it, there are dozens of old branches cluttering the project. Is there any way to:

  • Enable this checkbox for everyone by default – no longer make it "sticky"?
  • Delete all branches for which the associated pull request is merged, and is 0 commits ahead of master branch?
  • Solve my problem another way?

Thanks.

2 answers

I'd also like to know if there is something that could be done to set a default for this checkbox: either checked (my preference) or not (for the branch hoarders), and set for either a "project" (my preference) or per repo (in case some folks really really don't like it – "fine, go work in your repo over there" wink)

The ability to turn this off and on in the settings would be helpful. We use Vincent Driessen's git branching model, and I do NOT need my dev branch to be deleted when I merge it into stage, or stage into prod.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you