Get exact Git reference
gh_get_refGet a single Git ref (branch or tag) from a GitHub repository.
Instructions
Read-only: resolve one exact branch or tag reference path such as heads/main or tags/v1.0.0. This tool never performs matching-reference or prefix discovery. Annotated tag objects retain their tag-object identity and are peeled through bounded exact tag-object reads to a commit when applicable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | One exact Git ref path relative to refs/, formatted as heads/<branch> or tags/<tag>. Do not pass refs/, a bare branch/tag name, or a matching prefix. | |
| repo | Yes | GitHub repository name without the owner prefix. | |
| owner | Yes | GitHub repository owner or organization login. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| found | Yes | ||
| object_sha | No | ||
| object_url | No | ||
| object_type | No | ||
| peeled_commit_sha | No |