Skip to main content
GitHub Docs
Version:
Free, Pro, & Team
Search GitHub Docs
REST API
/
Commits
All products
REST API
API Version:
2022-11-28 (latest)
Quickstart
Overview
About GitHub's APIs
Resources in the REST API
API Versions
Media types
Authenticating
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
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 runners
Workflow jobs
Workflow runs
Workflows
Activity
Events
Feeds
Notifications
Starring
Watching
Apps
GitHub Apps
Installations
Marketplace
OAuth Authorizations
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
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
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
Search
Secret scanning
Teams
Teams
Discussion comments
Discussions
Members
Users
Users
Blocking users
Emails
Followers
GPG Keys
Git SSH Keys
SSH signing keys
Social accounts
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