Skip to main content
Auto delete feature branches toggle

What does the auto delete feature branches toggle 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 toggle 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 toggle work?

When the toggle is enabled, 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 behaviour 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 enabling the toggle 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?