Skip to main content
GitHub Docs
Version:
Free, Pro, & Team
Search GitHub Docs
REST API
/
Branches
/
Branches
Home
REST API
API Version:
2022-11-28 (latest)
Quickstart
Overview
Comparing GitHub's APIs
Resources in the REST API
Rate limits
API Versions
Media types
Authenticating
Keeping API credentials secure
Troubleshooting
Libraries
OpenAPI description
Issue event types
GitHub event types
Endpoints for GitHub App installation tokens
Endpoints for GitHub App user tokens
Endpoints for fine-grained PATs
Permissions for GitHub Apps
Permissions for fine-grained PATs
Breaking changes
Guides
Using the API
Script with JavaScript
Script with Ruby
Discover resources for a user
Delivering deployments
Rendering data as graphs
Working with comments
Pagination
Building a CI server
Best practices
Get started - Git database
Get started - Checks
Encrypt secrets
Actions
Artifacts
Cache
OIDC
Permissions
Secrets
Self-hosted runners
Variables
Workflow jobs
Workflow runs
Workflows
Activity
Events
Feeds
Notifications
Starring
Watching
Apps
GitHub Apps
Installations
Marketplace
OAuth Authorizations
Webhooks
Billing
Billing
Branches
Branches
List branches
Get a branch
Rename a branch
Sync a fork branch with the upstream repository
Merge a branch
Protected branches
Checks
Check Runs
Check Suites
Classroom
Classroom
Code Scanning
Code Scanning
Codes of conduct
Codes of conduct
Codespaces
Codespaces
Organizations
Organization secrets
Machines
Repository secrets
User secrets
Collaborators
Collaborators
Invitations
Commits
Commits
Commit comments
Commit statuses
Copilot
Copilot business
Dependabot
Alerts
Secrets
Dependency Graph
Dependency review
Dependency submission
Software bill of materials (SBOM)
Deploy keys
Deploy keys
Deployments
Deployment branch policies
Deployments
Environments
Protection rules
Deployment statuses
Emojis
Emojis
Gists
Gists
Comments
Git database
Blobs
Commits
References