Auto delete feature branches checkbox

What does the auto delete feature branches checkbox do in the pipeline settings?

Quinn Kuiper avatar
Written by Quinn Kuiper
Updated over a week ago

Introduction

When setting up a pipeline or when going into pipeline settings you will see a checkbox called Auto delete feature branches:

This setting automatically deletes feature branches when there are no open pull requests from the feature branch or any promotional branch.

This ensures that the repo no longer has older or unwanted branches that are causing 'noise' in the repo.

How does the checkbox work?

When the checkbox is selected, we delete any feature branches that do not have any pull requests (PRs) from either the feature branch (or any promotion branches created using the feature branch).

This gives the behavior that once a feature has been promoted to the final environment in the pipeline, the feature branch gets deleted as all the needed commits and changes will have been promoted into the long standing final branch.

What to be aware of?

Since the checkbox deletes any feature branch that has no PRs coming from it, closing a promotion branch in a pipeline will automatically delete the original feature branch as well.

If you wish to make a change to an in flight feature, then following the steps from this article is recommended:

Did this answer your question?