.nh .TH "GT-BRANCH-CREATE" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-branch-create - Create a branch .SH SYNOPSIS \fBgt branch create [flags]\fP .SH 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. .SS JSON FIELDS .EX can_merge, can_push, message, name, protected, required_approvals, sha, updated_at .EE .SH OPTIONS \fB-h\fP, \fB--help\fP[=false] help for create .PP \fB-s\fP, \fB--source\fP="" Branch, tag or commit to start from (default: the default branch) .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--csv\fP[=""] Output CSV with the specified comma-separated \fBfields\fR, or all fields .PP \fB--cwd\fP="" Working \fBdirectory\fR for repository discovery .PP \fB--debug\fP[=false] Log the method, URL, status, and duration of each HTTP request to stderr .PP \fB--host\fP="" Gitea instance \fBURL\fR, including any base path .PP \fB--interactive\fP[=false] Allow prompts with machine output .PP \fB-q\fP, \fB--jq\fP="" Filter JSON output using a jq \fBexpression\fR; implies --json .PP \fB--json\fP[=""] Output JSON with the specified comma-separated \fBfields\fR, or all fields .PP \fB--no-input\fP[=false] Disable prompts and implicit editor/browser interactions .PP \fB--remote\fP="" Git \fBremote\fR used for repository discovery .PP \fB-R\fP, \fB--repo\fP="" Select a repository as \fBOWNER/REPO\fR or URL .PP \fB--sudo\fP="" Perform API requests as this \fBuser\fR (requires an administrator account) .PP \fB--user\fP="" Account \fBname\fR on the selected instance .SH EXAMPLE .EX # 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 .EE .SH SEE ALSO \fBgt-branch(1)\fP