create_branch
Create a GitLab branch from a branch, tag, or commit. Specify project ID and branch name, choose a ref for the starting point, and the remote repository gets the new branch.
Instructions
Create a new branch. Use this to create a branch from a branch, tag, or commit; use get_branch or list_branches to inspect branches and protect_branch to configure protection afterward. The operation changes remote repository state, requires branch-creation permission, and returns the new branch or a validation, missing-ref, protected-project, or already-exists error. project_id accepts a numeric ID or URL-encoded path, branch is the new name, and ref selects its starting revision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Source branch/commit for new branch | |
| branch | Yes | Name for the new branch | |
| project_id | Yes | Project ID or complete URL-encoded path to project |