Introduction
Note: This setting isn't available during the initial Pipeline creation.
On the Pipelines page in Gearset, click the cog icon
-> Edit pipeline details... and then in the "General" tab of your Pipeline settings you can enable Auto delete feature branches toggle.
What does the setting do?
This setting automatically deletes feature branches when there are no open pull requests from the feature branch or any promotion branch (promotion branches are created by Gearset off your feature branch to propagate the pull requests via the Pipeline).
How does auto deleting feature branches help?
Auto deleting your feature branches ensures that the Pipeline repository is no longer showing any older or unwanted branches that otherwise may cause 'noise' in the repo.
β
The 'noise' would also be visible in Gearset when you preview the list of branches associated with that repository (e.g. on Compare and deploy page), for example when searching for a feature branch to which you'd like to make a commit.
How does the toggle work?
When the toggle is enabled, Gearset deletes 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?
1. Enabling the toggle will delete any feature branch without an open pull request.
2. In the Pipeline, if you are closing the pull request (which also deletes the promotion branch starting with gs-pipeline, such as gs-pipeline/Auto-Delete-Feature-Branch from below example), the original feature branch can also be deleted automatically.
3. If you plan to add more work to the feature branch, make sure the option Also delete the feature branch (branch_name) and the promotion branch remains unticked in the dialog box below!
β
Then you can safely select Close pull request.
If you wish to make a change to an in flight feature, then following the steps from this article is recommended:



