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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,453 views 26 12
Join discussion

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