Skip to main content
Skip to content

브랜치 자동 삭제 관리

리포지토리에서 끌어오기 요청이 병합된 후 헤드 분기를 자동으로 삭제할 수 있습니다.

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 보호된 분기 정보.

For a pull request opened from a fork, GitHub uses the Automatically delete head branches setting on the head repository (the fork), not the base repository where the pull request is merged. Automatic deletion requires both of the following:

  • The setting is enabled on the fork.
  • The user merging the pull request has write access to the fork.

If either requirement isn't met, the head branch isn't deleted automatically. A user with write access to the fork can manually delete the branch from the merged pull request. For more information, see 끌어오기 요청에서 분기 삭제 및 복원.

  1. On GitHub, 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 deselect Automatically delete head branches.

Further reading