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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create GitHub branch

> Create a GitHub branch at an existing commit.

`github.createBranch` creates a `refs/heads/` reference at an existing commit SHA.

```ts automations/create-github-branch.automation.ts theme={null}
import { automation } from "automate.ax"
import { github } from "automate.ax/github"

export default automation("Create release branch", () => {
  github.createBranch({
    branch: "release/2.0",
    owner: "SentsCo",
    repository: "automate.ax",
    sha: "existing-commit-sha",
  })
})
```

Provide `owner`, `repository`, a branch name without `refs/heads/`, and an existing commit `sha`. Returns the created reference's `ref` plus its target `sha` and `type`. GitHub rejects duplicate branch names and empty repositories. Requires Contents write permission.
