Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there a query or plugin that will create an audit report of feature branches in Bitbucket Server?

Our developers have a bad habit of not deleting the branches after they merge into develop or a release. So trying to figure away to check either last time accessed or just date created so we can notify them of old branches that needed deleted.

1 answer

1 accepted

Great question/request. There are a few ways to achieve this.

1. When a PR is merged Bitbucket Server offers to delete the source branch after the merge.

pr merge.png

2. Add an existing hook by clicking 'Add Hook' in your repo settings [1] and find a suitable hook on the Atlassian Marketplace

3. Write your own PostReceiveHook (called after merge) [2]

Let me know if you need any further guidance. We at Izymes have made an add-on that takes care of shaping your development and merge process from start to finish - it's called Workzone. Among a lot of other things can take care of deleting the source branch after merge. You can configure that on a branch-by-branch basis, you don't want to delete `develop` when it is merged to `release` for example :-)


[1] Documentation

[2] Developer documentation 

I can see how this relates to your previous question.

The repository owner may choose to implement a policy (see above) to delete merged branches right after they have been merged. As this only happens on the server, but not on the developers' machine, developers can still maintain a local branch, if they choose to. Then it is the developers' responsibility to declutter local branches that have been merged, but not yours.

As my father used to say: "Trust is good, control is better." LOL

Fantastic answer plus you actually provided how-to's wish they graded these answers like a 1 to 5, I'd give this one a 10!!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

253 views 2 9
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you