Skip to main content
GitHub Docs
Version:
Enterprise Cloud
Search GitHub Docs
All products
REST API
API Version:
2022-11-28 (latest)
Quickstart
Overview
Resources in the REST API
API Versions
Media types
Other authentication methods
Troubleshooting
Libraries
OpenAPI description
GitHub App-enabled endpoints
Fine-grained personal access token-enabled endpoints
GitHub App permissions
Breaking changes
Fine-grained personal access token permissions
Guides
Using the API
Basics of authentication
Script with JavaScript
Discover resources for a user
Delivering deployments
Rendering data as graphs
Working with comments
Pagination
Building a CI server
Integrator best practices
Get started - Git database
Get started - Checks
REST API reference
Actions
Artifacts
Cache
OIDC
Permissions
Required Workflows
Secrets
Variables
Self-hosted runner groups
Self-hosted runners
Workflow jobs
Workflow runs
Workflows
Activity
Events
Feeds
Notifications
Starring
Watching
Announcement Banners
Enterprise
Organization
Apps
GitHub Apps
Installations
Marketplace
OAuth Apps
Webhooks
Billing
Branches
Branches
Protected branches
Checks
Check Runs
Check Suites
Codes of conduct
Code Scanning
Codespaces
Codespaces
Organizations
Organization secrets
Machines
Repository secrets
User secrets
Collaborators
Collaborators
Invitations
Commits
Commits
Commit comments
Commit statuses
Dependabot
Alerts
Secrets
Dependency Graph
Dependency review
Dependency submission
Deploy keys
Deployments
Deployments
Environments
Deployment statuses
Deployment branch policies
Emojis
Enterprise administration
Admin stats
Audit log
Billing
Code security and analysis
License
Gists
Gists
Comments
Git database
Blobs
Commits
References
Tags
Trees
Gitignore
Interactions
Organization
Repository
User
Issues
Issues
Assignees
Comments
Events
Labels
Milestones
Timeline
Licenses
Markdown
Meta
Metrics
Community
Statistics
Traffic
Migrations
Organizations
Source imports
Users
Organizations
Organizations
Blocking users
Custom Repository Roles
Members
Outside Collaborators
Security Managers
Webhooks
Packages
Pages
Projects (classic)
Boards
Cards
Collaborators
Columns
Pulls
Pulls
Review comments
Review requests
Reviews
Rate limit
Reactions
Releases
Releases
Release Assets
Repositories
Repositories
Autolinks
Contents
Forks
Git LFS
Tags
SCIM
Search
Secret scanning
Teams
Teams
Discussion comments
Discussions
External groups
Members
Team synchronization
Users
Users
Blocking users
Emails
Followers
GPG Keys
Git SSH Keys
SSH signing keys
Repository webhooks
Repository Webhook Configuration
Repository Webhook Deliveries
Repository Webhooks
The REST API is now versioned.
For more information, see "
About API versioning
."
REST API
/
Commits
Commits
Use the REST API to interact with commits.
Commits
List commits
List branches for HEAD commit
List pull requests associated with a commit
Get a commit
Compare two commits
Commit comments
List commit comments for a repository
Get a commit comment
Update a commit comment
Delete a commit comment
List commit comments
Create a commit comment
Commit statuses
Get the combined status for a specific reference
List commit statuses for a reference
Create a commit status