> ## 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_create

> Create a branch or tag pointing at an existing commit. The reference must be fully qualified, like 'refs/heads/my-branch'.

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

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

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

<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. |
</div>

## Body

<div className="reference-table">
  | Field                                                       | Type     | Description                                                                                    |
  | ----------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------- |
  | `ref` <span className="required" title="required">\*</span> | `string` | The fully qualified reference, such as 'refs/heads/my-branch'. A bare branch name is rejected. |
  | `sha` <span className="required" title="required">\*</span> | `string` | The commit SHA the new reference points at.                                                    |
</div>
