{"meta":{"title":"在存储库中配置分支和合并","intro":"您可以管理存储库中的分支，配置分支在存储库中的合并方式，并通过定义拉取请求的可合并性来保护重要分支。","product":"存储库","breadcrumbs":[{"href":"/zh/repositories","title":"存储库"},{"href":"/zh/repositories/configuring-branches-and-merges-in-your-repository","title":"分支和合并"}],"documentType":"category"},"body":"# 在存储库中配置分支和合并\n\n您可以管理存储库中的分支，配置分支在存储库中的合并方式，并通过定义拉取请求的可合并性来保护重要分支。\n\n## Links\n\n* [管理仓库中的分支](/zh/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository)\n\n  每当你在 Git 中提出更改时，都会创建一个新分支。 分支管理是 Git 工作流程的重要部分。 在一些时间后，分支列表将会扩大，建议删除合并的分支或旧分支。\n\n* [配置拉取请求合并](/zh/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges)\n\n  可在 GitHub.com 上配置拉取请求合并，以匹配你的工作流和用于管理 Git 历史记录的首选项。\n\n* [管理受保护的分支](/zh/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches)\n\n  可以设置规则来保护存储库中的某些分支。 例如，您可以阻止未通过状态检查的拉取请求，或要求拉取请求在获得特定数量的批准审查之后才可合并。\n\n* [管理存储库的规则集](/zh/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets)\n\n  规则集有助于控制用户如何与存储库中的分支和标记交互。"}