After the adoption of RFC-514, merged branches that are named in the merge commit comment can be removed. Developers should feel free to do this for all merges going forward.
I have written a script that will find and remove only branches that are so named; that are merged to master
, next
(an integration branch from a previous workflow), or draft
(an integration branch for documents from a previous workflow); and that have had no commits since their merge. I am going to execute this script on the repositories in the lsst
and lsst-dm
GitHub orgs.
Local clones will not be affected until you do a git fetch --prune
.
We anticipate that this will improve the usefulness of aspects of the git and GitHub UIs pertaining to branches and will improve the performance of the Jira/GitHub integration.
By the nature of the removal, it is easy to re-create a branch that needs to be retained for some other reason: git checkout -b $BRANCH HEAD^{/Merge.*$BRANCH}^2