Skip to main content
GitHub Docs
All products
存储库
Create & manage repositories
关于仓库
Best practices
创建新仓库
Create from a template
Create a template repo
Issues-only repository
复制仓库
克隆仓库
排查克隆错误
重命名仓库
转让仓库
删除仓库
Restore deleted repository
Manage repository settings
Customize your repository
关于自述文件
许可仓库
Display a sponsor button
Social media preview
Classify with topics
关于代码所有者
Repository languages
关于 CITION 文件
Enable features
禁用议题
Disable classic projects
Manage GitHub Actions settings
Discussions
Security & analysis
Manage repository settings
Repository visibility
Teams & people
Manage the forking policy
Manage pull request reviews
Manage the commit signoff policy
Manage the push policy
Managing Git LFS objects in archives
Email notifications for pushes
Configure autolinks
Tag protection rules
Branches and merges
Manage branches
View branches
重命名分支
Change the default branch
Delete & restore branches
Configure PR merges
About merge methods
Configure commit merging
Configure commit squashing
Configure commit rebasing
Managing merge queue
Manage branch updates
Manage auto merge
Automatic branch deletion
Mergeability of PRs
关于受保护分支
Branch protection rule
Required status checks
Work with files
管理文件
创建新文件
Add a file
Move a file
Edit files
重命名文件
Delete files
How changed files appear
New code view (beta)
使用文件
在 GitHub 上导航代码
View files and track file changes
Permanent links to files
Working with non-code files
管理大型文件
Large files
Git Large File Storage
Install Git LFS
Configure Git LFS
Storage & bandwidth
Collaboration
Move a file to Git LFS
Remove files
Resolve upload failures
Release projects
关于发行版
Manage releases
View releases & tags
Searching releases
链接到发行版
比较发行版
Automated release notes
Automate release forms
View activity and data
View deployment activity
关于仓库图
View repository activity
View repository traffic
View project contributors
Analyze changes
Connections between repositories
Archive a repository
存档仓库
Archive content & data
Reference & cite content
备份仓库
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the
English documentation
.
存储库
/
Branches and merges
Free, Pro, & Team
简体中文
Search GitHub Docs
GitHub Docs
存储库
/
Branches and merges
Repositories
Get started
Account and profile
Authentication
Repositories
Enterprise administrators
Billing and payments
Site policy
Organizations
Code security
Pull requests
GitHub Issues
GitHub Actions
GitHub Copilot
GitHub Codespaces
GitHub Packages
Search on GitHub
Developers
REST API
GraphQL API
GitHub CLI
GitHub Discussions
GitHub Sponsors
Building communities
GitHub Pages
Education
GitHub Desktop
GitHub Support
Electron
CodeQL
npm
Free, Pro, & Team
Free, Pro, & Team
Enterprise Cloud
Enterprise Server 3.7
Enterprise Server 3.6
Enterprise Server 3.5
Enterprise Server 3.4
Enterprise Server 3.3
GitHub AE
All Enterprise Server releases
About versions
简体中文
English
简体中文
Español
Português do Brasil
Русский
日本語
Français
Deutsch
한국어
Search GitHub Docs
在存储库中配置分支和合并
您可以管理存储库中的分支,配置分支在存储库中的合并方式,并通过定义拉取请求的可合并性来保护重要分支。
管理仓库中的分支
查看仓库中的分支
重命名分支
更改默认分支
删除和恢复拉取请求中的分支
配置拉取请求合并
关于 GitHub 上的合并方法
为拉取请求配置提交合并
为拉取请求配置提交压缩
为拉取请求配置提交变基
管理合并队列
管理更新拉取请求分支的建议
管理仓库中拉取请求的自动合并
管理分支的自动删除
定义拉取请求的可合并性
关于受保护分支
管理分支保护规则
必需状态检查故障排除