Skip to main content

Эта версия GitHub Enterprise Server будет прекращена 2023-12-20. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.

Управление автоматическим удалением ветвей

Вы можете автоматически удалять головные ветви после объединения запросов на вытягивание в репозитории.

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 "About protected branches."

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

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

Further reading