Skip to main content

Configuring branches and merges in your repository

You can manage branches in your repository, configure the way branches are merged in your repository, and protect important branches by defining the mergeability of pull requests.

Managing branches in your repository

Whenever you propose a change in Git, you create a new branch. Branch management is an important part of the Git workflow. After some time, your list of branches may grow, so it's a good idea to delete merged or stale branches.

Configuring pull request merges

You can configure pull request merges on GitHub.com to match your workflow and preferences for managing Git history.

Managing protected branches

You can set up rules to protect certain branches in your repository. For example, you can block pull requests that don't pass status checks or require that pull requests have a specific number of approving reviews before they can be merged.

Managing rulesets for a repository

Rulesets help you to control how people can interact with branches and tags in a repository.