-
Suggestion
-
Resolution: Unresolved
-
None
-
45
-
Hi everyone,
Thanks to everyone for voting and commenting on this suggestion. Your input in the comments helps us understand how this affects you and what you're hoping to accomplish with Bitbucket Data Center.
We spend a significant amount of time determining our product investments in Bitbucket Data Center. Unfortunately, we are not planning to address this suggestion in the next 12 months. In the last year, we have resolved many of the highly voted suggestions like Reviewer groups, Pull request templates, capability to enable/disable source branch deletion on merging pull requests and our upcoming roadmap includes a number of other top voted suggestions, including repository archiving. Please check out our public roadmap for more details on the coming soon and future items.
Meantime, for bulk deletion of merged branches you can periodically execute the following bash script. It deletes all remote branches that have been fully merged into the "current" checked-out branch (in our case this is "develop"):
#!/bin/bash # list merged branches BRANCHES=`git branch -r --merged | grep -v "*" | grep -v master | grep -v develop | grep -v release/ | grep -v hotfix/ | sed 's/origin\///'` printf "Removing branches: \n$BRANCHES" # delete all remote branches merged into the current branch (i.e. develop), excluding release/master/develop branches git branch -r --merged | grep -v "*" | grep -v master | grep -v develop | grep -v release/ | grep -v hotfix/ | sed 's/origin\///' | xargs -n 1 git push --delete origin
It's also worth mentioning that since Bitbucket 7.15 admins can choose if delete source branch should be the default option on pull request merge. We believe defaulting deletion of source branches should help to prevent growth of merged and stale branches.
I understand that this may be disappointing, but it’s important for us to be open, honest, and transparent with our customers. Product feedback is collected from many different sources and is evaluated when planning the product roadmap. You can learn more about our process here.
Cheers,
Anton Genkin
Product Manager - Bitbucket Data Center & Server
Original suggestion:
Scenario: We have a ton of feature branches left over from past projects, also from using source tree gitflow, only the local branch is deleted.
I want to be able to see which of these have been merged into a specified branch (i.e. master), so I can cull the old branches.
This is no benefit to stash from a technical viewpoint, but it improves the usability by reducing the number of branches a developer has to walk through.
We are only just starting to use 'pull requests' to do merges. So the existing functionality to 'delete' on merge does not apply.
Prior to stash, I would simply map a network drive to the remote repo, and use the command line to locate and prune all merged branches.
With stash, I am having to do this one at a time, via SourceTree's User Interface.
- incorporates
-
BSERV-7637 Ability to archive/hide branches on the Stash UI
- Closed
- is duplicated by
-
BSERV-4967 Add functionality to assist cleaning up obsolete branches
- Closed
-
BSERV-5040 Lists of branches/Tags not sorted
- Closed
-
BSERV-7805 Bulk delete branches
- Closed
-
BSERV-9579 Ability to delete multiple branches
- Closed
-
BSERV-9598 It would be great to be able to delete the very old branches from BitBucket interface
- Closed
- is related to
-
BSERV-9271 Automatically remove branches if they do not have any commits for past X days
- Closed
-
BSERV-10763 Simplify way to delete branch after merge
- Gathering Interest
- relates to
-
BSERV-9254 Allow "Delete source branch after merging" to be enabled by default
- Closed
-
BSERV-9270 Create filter for branches that have commits ahead of master
- Gathering Interest
-
BSERV-8917 As an admin, I would like separate "Create" and "Modify" permissions for users and user groups in Branch Permissions
- Waiting for Release
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...