feat: generate the gt command reference from gitea/cli

update_cli_docs.sh runs gt's own generator and lays the pages out for the
site: one directory per command group, front matter, titles, sidebar
order, fenced help text and rewritten links. --released succeeds while no
series is documented. A weekly workflow proposes updates like the runner's.

Signed-off-by: bircni <[email protected]>
This commit is contained in:
bircni committed 2026-10-22 11:28:15 +02:00
1 parent fe618c42be
commit 55c3a392a1
261 files changed
+15116 -2

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
---
sidebar_position: 1
description: "Create a branch"
---
# gt branch create
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Create a branch
## Synopsis
```text
Create a branch on the server from another branch, a tag or a commit; the default branch unless --source names one.
```
```
gt branch create <branch> [flags]
```
## Examples
```
# 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
```
## Options
```
-h, --help help for create
-s, --source string Branch, tag or commit to start from (default: the default branch)
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+48
View File
@@ -0,0 +1,48 @@
---
sidebar_position: 2
description: "Delete branches"
---
# gt branch delete
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Delete branches
```
gt branch delete <branch>... [flags]
```
## Examples
```
$ gt branch delete feature/login
$ gt branch delete old-a old-b --yes
```
## Options
```
-h, --help help for delete
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+55
View File
@@ -0,0 +1,55 @@
---
sidebar_position: 5
description: "Manage remote branches and protection rules"
---
# gt branch
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Manage remote branches and protection rules
## Synopsis
```text
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.
```
```
gt branch [flags]
```
## Options
```
-h, --help help for branch
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt](../index.md): Work with Gitea from your terminal
* [gt branch create](../branch/create.md): Create a branch
* [gt branch delete](../branch/delete.md): Delete branches
* [gt branch list](../branch/list.md): List branches
* [gt branch protect](../branch/protect.md): Protect branches
* [gt branch rename](../branch/rename.md): Rename a branch
* [gt branch unprotect](../branch/unprotect.md): Remove branch protection
* [gt branch view](../branch/view.md): View a branch
+50
View File
@@ -0,0 +1,50 @@
---
sidebar_position: 3
description: "List branches"
---
# gt branch list
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
List branches
```
gt branch list [flags]
```
## Examples
```
$ gt branch list
$ gt branch list -R alice/project --limit 100 --json name,sha
```
## Options
```
-h, --help help for list
-L, --limit int Maximum number of results (1..1000) (default 30)
--page int Result page (default 1)
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+67
View File
@@ -0,0 +1,67 @@
---
sidebar_position: 4
description: "Protect branches"
---
# gt branch protect
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Protect branches
## Synopsis
```text
Add a protection rule for each existing branch, or with --pattern for every branch matching a
glob. By default nobody can push directly and pull requests need one approving review.
When a branch or pattern has a rule already, change only the settings the flags name and keep
the others; --allow-push replaces those who may push directly.
```
```
gt branch protect <branch>... [flags]
```
## Examples
```
# Require two approvals and passing CI on main
$ gt branch protect main --required-approvals 2 --status-check ci/build
# Let the release team push to every release branch
$ gt branch protect --pattern 'release/*' --allow-push acme/release
```
## Options
```
--allow-push strings Users, or teams as ORG/TEAM, that may push directly
--block-on-rejected-reviews Block merging while changes are requested
--dismiss-stale-approvals Dismiss approvals when new commits are pushed
-h, --help help for protect
--pattern string Protect the branches matching this glob, such as release/*
--required-approvals int Approving reviews that pull requests need (default 1)
--status-check strings Status checks that must pass (repeatable)
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+47
View File
@@ -0,0 +1,47 @@
---
sidebar_position: 5
description: "Rename a branch"
---
# gt branch rename
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Rename a branch
```
gt branch rename <branch> <new-name> [flags]
```
## Examples
```
$ gt branch rename feature/logn feature/login
```
## Options
```
-h, --help help for rename
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+54
View File
@@ -0,0 +1,54 @@
---
sidebar_position: 6
description: "Remove branch protection"
---
# gt branch unprotect
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Remove branch protection
## Synopsis
```text
Remove the protection rules of branches, or of glob patterns such as release/*.
```
```
gt branch unprotect <branch>... [flags]
```
## Examples
```
$ gt branch unprotect main
$ gt branch unprotect 'release/*' --yes
```
## Options
```
-h, --help help for unprotect
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules
+49
View File
@@ -0,0 +1,49 @@
---
sidebar_position: 7
description: "View a branch"
---
# gt branch view
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
View a branch
```
gt branch view <branch> [flags]
```
## Examples
```
$ gt branch view main
$ gt branch view feature/login --web
```
## Options
```
-h, --help help for view
-w, --web Open the branch in the browser
```
## Options inherited from parent commands
```
--cwd directory Working directory for repository discovery
--debug Log the method, URL, status, and duration of each HTTP request to stderr
--host URL Gitea instance URL, including any base path
--interactive Allow prompts with machine output
-q, --jq expression Filter JSON output using a jq expression; implies --json
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
--no-input Disable prompts and implicit editor/browser interactions
--remote remote Git remote used for repository discovery
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
--sudo user Perform API requests as this user (requires an administrator account)
--user name Account name on the selected instance
-y, --yes Accept confirmations without prompting
```
## SEE ALSO
* [gt branch](../branch/index.md): Manage remote branches and protection rules