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

+61
View File
@@ -0,0 +1,61 @@
---
sidebar_position: 1
description: "Archive a repository"
---
# gt repo archive
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Archive a repository
## Synopsis
```text
Archive a repository. An archived repository is read-only: nobody can push to it or change its
issues, pull requests, releases or wiki until it is unarchived with gt repo unarchive.
```
```
gt repo archive [<repository>...] [flags]
```
## Examples
```
# Archive a repository
$ gt repo archive alice/old-project
# Archive without a prompt; scripts must name the repository
$ gt repo archive alice/old-project --yes
# Archive several repositories after one confirmation
$ gt repo archive acme/legacy-api acme/legacy-web
```
## Options
```
-h, --help help for archive
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+66
View File
@@ -0,0 +1,66 @@
---
sidebar_position: 2
description: "Clone a repository locally"
---
# gt repo clone
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Clone a repository locally
## Synopsis
```text
Clone a repository with the configured Git protocol and gt's credentials. Git flags can
follow --. A fork's parent is added as the "upstream" remote, and gt commands in the clone then
target the parent. A pull mirror's source is added as the "source" remote; gt commands keep
targeting the mirror.
```
```
gt repo clone <repository> [<directory>] [-- <gitflags>...] [flags]
```
## Examples
```
# Clone a repository into ./project
$ gt repo clone alice/project
# Clone into another directory with the last commit only
$ gt repo clone alice/project src --depth 1
# Pass flags to git clone
$ gt repo clone alice/project -- --branch develop --recurse-submodules
```
## Options
```
-d, --depth int Number of commits to fetch (0: full history)
-h, --help help for clone
--no-upstream Do not add a remote for the parent of a fork or the source of a mirror
-u, --upstream-remote-name string Remote name for the parent of a fork (default "upstream")
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+89
View File
@@ -0,0 +1,89 @@
---
sidebar_position: 3
description: "Create a repository"
---
# gt repo create
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Create a repository
## Synopsis
```text
Create a repository for your account, or for an organization as ORG/NAME or with --org.
--auto-init adds a first commit with a README, .gitignore and license; --template copies another
repository. --source adds the new repository as a remote of a local Git repository, and --push
pushes its current branch there.
```
```
gt repo create [<name>] [flags]
```
## Examples
```
# Create a private repository with a README and an MIT license
$ gt repo create project --private --auto-init --license MIT
# Create a repository in an organization from a template
$ gt repo create acme/service --template acme/service-template
# Publish the local repository in the current directory
$ gt repo create project --source . --push
```
## Options
```
--as-template Make the new repository a template
--auto-init Add a first commit with a README
--clone Clone the new repository into the current directory
--copy-avatar Copy the template's avatar (default true)
--copy-content Copy the template's Git content (default true)
--copy-git-hooks Copy the template's Git hooks (default true)
--copy-labels Copy the template's labels (default true)
--copy-topics Copy the template's topics (default true)
--copy-webhooks Copy the template's webhooks
--default-branch string Name of the default branch
-d, --description string Repository description
-g, --gitignores string Comma-separated .gitignore templates (requires --auto-init)
-h, --help help for create
--label-template string Add the labels of this label set
-l, --license string License template (requires --auto-init)
--object-format string Git object format {sha1|sha256}
--org string Create the repository in this organization
--private Make the repository private
--public Make the repository public (the default)
--push Push the current branch of --source
--readme string README template (requires --auto-init)
--remote-name string Name of the new repository's remote in --source (default "origin")
--source string Publish the local Git repository in this directory
--team string Grant this organization team access
--template string Copy this template repository (OWNER/REPO or URL)
--trust-model string Signature trust model {default|collaborator|committer|collaboratorcommitter}
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+57
View File
@@ -0,0 +1,57 @@
---
sidebar_position: 4
description: "Delete a repository"
---
# gt repo delete
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Delete a repository
## Synopsis
```text
Delete a repository with its issues, pull requests, releases and wiki. This cannot be undone.
```
```
gt repo delete [<repository>] [flags]
```
## Examples
```
# Delete a repository after typing its name
$ gt repo delete alice/old-project
# Delete without a prompt
$ gt repo delete alice/old-project --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 repo](../repo/index.md): Work with Gitea repositories
+58
View File
@@ -0,0 +1,58 @@
---
sidebar_position: 1
description: "Add a deploy key from a public key file or stdin"
---
# gt repo deploy-key add
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Add a deploy key from a public key file or stdin
## Synopsis
```text
Add an SSH public key as a deploy key of the repository; - reads it from stdin. The key can
only read the repository unless --allow-write lets it push. The title defaults to the key's
comment.
```
```
gt repo deploy-key add <file> [flags]
```
## Examples
```
$ gt repo deploy-key add ci.pub --title "Build server"
$ gt repo deploy-key add deploy.pub --title "Release bot" --allow-write
```
## Options
```
-w, --allow-write Let the key push to the repository
-h, --help help for add
-t, --title string Key title (defaults to the key comment)
```
## 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 repo deploy-key](../../repo/deploy-key/index.md): Manage deploy keys
@@ -0,0 +1,48 @@
---
sidebar_position: 2
description: "Delete a deploy key"
---
# gt repo deploy-key delete
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Delete a deploy key
```
gt repo deploy-key delete <id> [flags]
```
## Examples
```
$ gt repo deploy-key delete 4
$ gt repo deploy-key delete 4 --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 repo deploy-key](../../repo/deploy-key/index.md): Manage deploy keys
@@ -0,0 +1,52 @@
---
sidebar_position: 5
description: "Manage deploy keys"
---
# gt repo deploy-key
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Manage deploy keys
## Synopsis
```text
Manage the deploy keys of a repository: SSH keys that grant access to that repository only,
such as for a build server. A deploy key can read the repository, and push to it when added
with --allow-write.
```
```
gt repo deploy-key [flags]
```
## Options
```
-h, --help help for deploy-key
```
## 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 repo](../../repo/index.md): Work with Gitea repositories
* [gt repo deploy-key add](../../repo/deploy-key/add.md): Add a deploy key from a public key file or stdin
* [gt repo deploy-key delete](../../repo/deploy-key/delete.md): Delete a deploy key
* [gt repo deploy-key list](../../repo/deploy-key/list.md): List deploy keys
@@ -0,0 +1,50 @@
---
sidebar_position: 3
description: "List deploy keys"
---
# gt repo deploy-key list
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
List deploy keys
```
gt repo deploy-key list [flags]
```
## Examples
```
$ gt repo deploy-key list
$ gt repo deploy-key list -R acme/site --json title,read_only
```
## 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 repo deploy-key](../../repo/deploy-key/index.md): Manage deploy keys
+79
View File
@@ -0,0 +1,79 @@
---
sidebar_position: 6
description: "Edit repository settings"
---
# gt repo edit
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Edit repository settings
## Synopsis
```text
Edit the settings of a repository. Only the flags you pass change; on/off settings such as
--enable-wiki take =false to turn them off.
```
```
gt repo edit [<repository>] [flags]
```
## Examples
```
# Change the description and the website
$ gt repo edit --description "Command line tool" --website https://example.com
# Make a repository private and disable its wiki
$ gt repo edit alice/project --visibility private --enable-wiki=false
# Squash pull requests by default and tag the repository
$ gt repo edit --default-merge-style squash --add-topic cli --add-topic go
```
## Options
```
--actions Enable Actions
--add-topic strings Add topics (repeatable or comma-separated)
--allow-merge-commit Allow merging pull requests with a merge commit
--allow-rebase Allow rebase merging pull requests
--allow-squash Allow squash merging pull requests
--as-template Make the repository a template
--default-branch string Default branch; it must exist
--default-merge-style string Default merge style for pull requests {merge|rebase|rebase-merge|squash|fast-forward-only}
--delete-branch-on-merge Delete head branches after merging pull requests
-d, --description string Repository description
--enable-issues Enable issues
--enable-projects Enable projects
--enable-pull-requests Enable pull requests
--enable-wiki Enable the wiki
-h, --help help for edit
--private Make the repository private (=false makes it public)
--remove-topic strings Remove topics (repeatable or comma-separated)
--visibility string Repository visibility {public|private}
--website string Repository website (empty clears it)
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+68
View File
@@ -0,0 +1,68 @@
---
sidebar_position: 7
description: "Fork a repository"
---
# gt repo fork
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Fork a repository
## Synopsis
```text
Fork a repository for your account, or into an organization with --org. An existing fork is
reported instead of failing.
--clone clones the fork (Git flags can follow --). Inside a clone of the repository, --remote adds
the fork as "origin" and renames the current "origin" to "upstream".
```
```
gt repo fork [<repository>] [-- <gitflags>...] [flags]
```
## Examples
```
# Fork the repository of the current clone and add the fork as origin
$ gt repo fork --remote
# Fork a repository into an organization under another name
$ gt repo fork alice/project --org acme --fork-name project-fork
# Fork and clone a repository
$ gt repo fork alice/project --clone -- --depth 1
```
## Options
```
--clone Clone the fork
--fork-name string Name of the fork (default: the repository's name)
-h, --help help for fork
--org string Fork into this organization
--remote Add the fork as a remote of the current clone
--remote-name string Name of the fork's remote (default "origin")
```
## 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
-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 repo](../repo/index.md): Work with Gitea repositories
+62
View File
@@ -0,0 +1,62 @@
---
sidebar_position: 17
description: "Work with Gitea repositories"
---
# gt repo
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Work with Gitea repositories
## Synopsis
```text
Work with Gitea repositories: list and view them, create, fork, clone and migrate them, keep
local branches and forks in sync, and change their settings.
```
```
gt repo [flags]
```
## Options
```
-h, --help help for repo
```
## 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 repo archive](../repo/archive.md): Archive a repository
* [gt repo clone](../repo/clone.md): Clone a repository locally
* [gt repo create](../repo/create.md): Create a repository
* [gt repo delete](../repo/delete.md): Delete a repository
* [gt repo deploy-key](../repo/deploy-key/index.md): Manage deploy keys
* [gt repo edit](../repo/edit.md): Edit repository settings
* [gt repo fork](../repo/fork.md): Fork a repository
* [gt repo list](../repo/list.md): List repositories
* [gt repo migrate](../repo/migrate.md): Import a repository from another server
* [gt repo rename](../repo/rename.md): Rename a repository
* [gt repo set-default](../repo/set-default.md): Set the default repository for this clone
* [gt repo sync](../repo/sync.md): Sync a branch with its remote or its fork's parent
* [gt repo unarchive](../repo/unarchive.md): Unarchive a repository
* [gt repo view](../repo/view.md): View a repository
+66
View File
@@ -0,0 +1,66 @@
---
sidebar_position: 8
description: "List repositories"
---
# gt repo list
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
List repositories
## Synopsis
```text
List the repositories you can access, those of a user or organization, or the repositories you
starred or watch.
```
```
gt repo list [<owner>] [flags]
```
## Examples
```
# List the repositories you can access
$ gt repo list
# List the forks of an organization
$ gt repo list acme --type fork
# List your starred repositories as JSON
$ gt repo list --starred --json full_name,url
```
## Options
```
-h, --help help for list
-L, --limit int Maximum number of results (1..1000) (default 30)
--page int Result page (default 1)
--starred List your starred repositories
--type string Only list repositories of this kind {fork|source|mirror}
--watched List the repositories you watch
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+85
View File
@@ -0,0 +1,85 @@
---
sidebar_position: 9
description: "Import a repository from another server"
---
# gt repo migrate
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Import a repository from another server
## Synopsis
```text
Import a repository from a Git URL, or from another forge with --service (which can also copy
issues, pull requests, releases and more). A private source needs --auth-token or --auth-user and
--auth-password. --mirror creates a pull mirror instead. The name defaults to the last segment of
the URL.
```
```
gt repo migrate [<clone-url>] [flags]
```
## Examples
```
# Import a public Git repository
$ gt repo migrate https://github.com/go-gitea/gitea.git
# Mirror a repository into an organization every 8 hours
$ gt repo migrate https://github.com/go-gitea/gitea.git --owner acme --mirror --mirror-interval 8h
# Import a GitHub repository with its issues and pull requests
$ gt repo migrate https://github.com/acme/tool --service github --issues --pull-requests --auth-token-file token.txt
```
## Options
```
--auth-password string Source password (prefer file input)
--auth-password-file string Read source password from file or -
--auth-token string Source API token (prefer file input)
--auth-token-file string Read source API token from file or -
--auth-user string Source authentication username
-d, --description string Repository description
-h, --help help for migrate
--issues Copy issues
--labels Copy labels
--lfs Copy LFS objects
--lfs-endpoint string Source LFS endpoint
--milestones Copy milestones
--mirror Create a pull mirror
--mirror-interval string Mirror interval, for example 8h (0 turns off periodic sync)
--name string Destination repository name (default: the source's name)
--owner string Destination user or organization (default: your account)
--private Make the imported repository private
--pull-requests Copy pull requests
--releases Copy releases
--server-path string Absolute source Git repository path on the Gitea server (requires server permission)
--service string Source service {git|gitea|gitlab|gogs|github} (default "git")
--timeout duration Maximum migration request duration; Gitea may continue an import after cancellation (default 10m0s)
--wiki Copy wiki
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+58
View File
@@ -0,0 +1,58 @@
---
sidebar_position: 10
description: "Rename a repository"
---
# gt repo rename
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Rename a repository
## Synopsis
```text
Rename a repository; its owner stays the same. Git remotes keep working through Gitea's redirect from the old name, but gt commands do not;
a default repository saved with gt repo set-default is updated.
```
```
gt repo rename <new-name> [flags]
```
## Examples
```
# Rename the repository of the current clone
$ gt repo rename new-name
# Rename another repository
$ gt repo rename new-name -R alice/old-name
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+63
View File
@@ -0,0 +1,63 @@
---
sidebar_position: 11
description: "Set the default repository for this clone"
---
# gt repo set-default
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Set the default repository for this clone
## Synopsis
```text
Set the repository that gt commands use in the current Git clone instead of the one of its Git
remotes (saved as gt.repository in the clone's Git configuration).
```
```
gt repo set-default [<repository>] [flags]
```
## Examples
```
# Make gt commands in this clone use the fork's parent
$ gt repo set-default alice/project
# Show the saved repository
$ gt repo set-default --view
# Go back to the repository of the Git remotes
$ gt repo set-default --unset
```
## Options
```
-h, --help help for set-default
-u, --unset Remove the saved default repository
-v, --view Print the saved default repository
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+67
View File
@@ -0,0 +1,67 @@
---
sidebar_position: 12
description: "Sync a branch with its remote or its fork's parent"
---
# gt repo sync
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Sync a branch with its remote or its fork's parent
## Synopsis
```text
Fast-forward a local branch (default: the repository's default branch) to the same branch on
the repository's Git remote, without switching branches. Diverged branches are left unchanged.
Given a repository without a Git remote here, sync updates it on the server instead: a fork
fast-forwards to its parent, and a pull mirror fetches its source. Gitea updates a mirror as a
whole and in the background, so --branch is refused for a mirror, and the JSON result names
only the source, as remote.
```
```
gt repo sync [<repository>] [flags]
```
## Examples
```
# Fast-forward the default branch from the repository's remote
$ gt repo sync
# Fast-forward another branch
$ gt repo sync --branch release/1.0
# Update a fork on the server from its parent
$ gt repo sync bob/project
```
## Options
```
-b, --branch string Branch to sync (default: the repository's default branch)
-h, --help help for sync
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+53
View File
@@ -0,0 +1,53 @@
---
sidebar_position: 13
description: "Unarchive a repository"
---
# gt repo unarchive
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
Unarchive a repository
## Synopsis
```text
Unarchive an archived repository, so that it accepts pushes and changes again.
```
```
gt repo unarchive [<repository>...] [flags]
```
## Examples
```
$ gt repo unarchive alice/old-project
```
## Options
```
-h, --help help for unarchive
```
## 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 repo](../repo/index.md): Work with Gitea repositories
+63
View File
@@ -0,0 +1,63 @@
---
sidebar_position: 14
description: "View a repository"
---
# gt repo view
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
View a repository
## Synopsis
```text
View a repository: its description, state, counts and clone URLs, followed by its README, which
is rendered on a terminal.
```
```
gt repo view [<repository>] [flags]
```
## Examples
```
# View the repository of the current clone
$ gt repo view
# View the README of another branch
$ gt repo view alice/project --branch develop
# Open the repository in the browser
$ gt repo view alice/project --web
```
## Options
```
-b, --branch string Show the README of this branch (default: the default branch)
-h, --help help for view
-w, --web Open the repository, or with --branch that 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 repo](../repo/index.md): Work with Gitea repositories