| GT-BRANCH-CREATE(1) | gitea-cli Manual | GT-BRANCH-CREATE(1) |
NAME
gt-branch-create - Create a branch
SYNOPSIS
gt branch create <branch> [flags]
DESCRIPTION
Create a branch on the server from another branch, a tag or a commit; the default branch unless --source names one. In a clone, a --source that is no branch on the server, such as HEAD or a short SHA, names the commit it resolves to in the clone. gt never pushes, so push that commit first.
JSON FIELDS
can_merge, can_push, message, name, protected, required_approvals, sha, updated_at
OPTIONS
-h, --help[=false] help for create
-s, --source="" Branch, tag or commit to start from (default: the default branch)
OPTIONS INHERITED FROM PARENT COMMANDS
--csv[=""] Output CSV with the specified comma-separated fields, or all fields
--cwd="" Working directory for repository discovery
--debug[=false] Log the method, URL, status, and duration of each HTTP request to stderr
--host="" Gitea instance URL, including any base path
--interactive[=false] Allow prompts with machine output
-q, --jq="" Filter JSON output using a jq expression; implies --json
--json[=""] Output JSON with the specified comma-separated fields, or all fields
--no-input[=false] Disable prompts and implicit editor/browser interactions
--remote="" Git remote used for repository discovery
-R, --repo="" Select a repository as OWNER/REPO or URL
--sudo="" Perform API requests as this user (requires an administrator account)
--user="" Account name on the selected instance
EXAMPLE
# Branch off the default branch $ gt branch create feature/login # Branch off a tag or a commit $ gt branch create hotfix/1.0.1 --source v1.0.0 $ gt branch create bisect --source 3f2a9c1
SEE ALSO
| Nov 2026 | gitea-cli |