mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-07 02:20:31 +00:00
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:
261 files changed
+15116
-2
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user