List branches for HEAD commit
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
GET
/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- commit_sha stringrequired
commit_sha parameter
Responses
application/json array[Branch Short object]
Response
items Branch Short objectBranch Short
items Branch Short object
Branch Short
commit objectrequired
commit object
requiredsha string
requiredurl string
requiredname string
requiredprotected boolean
requiredapplication/json Validation Error object
Validation failed
documentation_url string
required errors array[object]optional
errors array[object]
optional items object
items object
code string
requiredfield string
optionalindex integer
optionalmessage string
optionalresource string
optionalvalue
optionalmessage string
required