---
name: "gt-branch"
section: "1"
platform: "linux"
package: "gitea-cli"
version: "1.0.0-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/gt-branch"
---

# gt-branch(1)

Manage remote branches and protection rules

## NAME

gt-branch - Manage remote branches and protection rules

## SYNOPSIS

**gt branch \[flags\]**

## 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.

## OPTIONS

**-h**, **--help**\[=false\]\
 	help for branch

## OPTIONS INHERITED FROM PARENT COMMANDS

**--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

**--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

## SEE ALSO

**[gt(1)](/man/gt/1.md)**, **[gt-branch-create(1)](/man/gt-branch-create/1.md)**, **[gt-branch-delete(1)](/man/gt-branch-delete/1.md)**, **[gt-branch-list(1)](/man/gt-branch-list/1.md)**, **[gt-branch-protect(1)](/man/gt-branch-protect/1.md)**, **[gt-branch-rename(1)](/man/gt-branch-rename/1.md)**, **[gt-branch-unprotect(1)](/man/gt-branch-unprotect/1.md)**, **[gt-branch-view(1)](/man/gt-branch-view/1.md)**
