> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# git_refs_list_matching

> List every reference under a prefix — `heads/` for all branches, `tags/v2` for the v2 tags. A prefix match, so `heads/feat` also returns `heads/feature-x`.

<div className="tool-route"><span className="tool-row-method" data-method="GET">GET</span><code>{"https://api.github.com/repos/{owner}/{repo}/git/matching-refs/{ref}"}</code></div>

```python github_git_refs_list_matching.py theme={null}
from charter.packs import github

result = await github.git_refs_list_matching.ainvoke({"owner": ..., "repo": ..., "ref": ...})
```

<Note>
  Requires `repo`, `read:user`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                         | Type     | Description                                                                                                                |
  | ------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span> | `string` | The account owner of the repository. The name is not case sensitive.                                                       |
  | `repo` <span className="required" title="required">\*</span>  | `string` | The name of the repository without the `.git` extension. The name is not case sensitive.                                   |
  | `ref` <span className="required" title="required">\*</span>   | `string` | The reference prefix to match, such as `heads/` for every branch or `tags/v2` for the v2 tags. Without the `refs/` prefix. |
</div>
