.nh .TH "GT-BRANCH" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-branch - Manage remote branches and protection rules .SH SYNOPSIS \fBgt branch [flags]\fP .SH DESCRIPTION Work with the branches of a repository on the server: list and view them, create, rename and delete them, and protect them from direct pushes. To work with local branches, use git. .SH OPTIONS \fB-h\fP, \fB--help\fP[=false] help for branch .SH OPTIONS INHERITED FROM PARENT COMMANDS \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--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 SEE ALSO \fBgt(1)\fP, \fBgt-branch-create(1)\fP, \fBgt-branch-delete(1)\fP, \fBgt-branch-list(1)\fP, \fBgt-branch-protect(1)\fP, \fBgt-branch-rename(1)\fP, \fBgt-branch-unprotect(1)\fP, \fBgt-branch-view(1)\fP