Create a branch
create_branchCreates a new branch in a Forgejo, Codeberg, or Gitea repository, optionally from an existing branch, tag, or commit, so you can isolate work or prepare changes.
Instructions
Create a branch in a repository (owner/repo/new_branch, optional old_ref; requires write mode). Answers with the branch in list_branches' shape: name, head commit and protection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner. | |
| old_ref | No | Existing branch, tag, or commit to branch from. Defaults to the repo's default branch. | |
| new_branch | Yes | Name for the new branch. |