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. |
|
|
|
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 %}
- On the "General" settings page, you can find a section called "Pull Requests". Under "Pull Requests", select or deselect Automatically delete head branches.