Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 1.61 KB

File metadata and controls

25 lines (22 loc) · 1.61 KB
title intro redirect_from versions topics shortTitle
Managing the automatic deletion of branches
You can have head branches automatically deleted after pull requests are merged in your repository.
/articles/managing-the-automatic-deletion-of-branches
/github/administering-a-repository/managing-the-automatic-deletion-of-branches
/github/administering-a-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches
fpt ghes ghec
*
*
*
Repositories
Automatic branch deletion

Anyone with admin permissions to a repository can enable or disable the automatic deletion of branches. Branch protection rules and repository rules can also prevent branches being automatically deleted. For more information, see{% ifversion fpt or ghec %} "AUTOTITLE" and{% endif %} "AUTOTITLE."

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %}

  1. On the "General" settings page, you can find a section called "Pull Requests". Under "Pull Requests", select or deselect Automatically delete head branches.

Further reading