Scroll to navigation

GH-REPO-CREATE(1) GitHub CLI manual GH-REPO-CREATE(1)

NAME

gh-repo-create - Create a new repository

SYNOPSIS

gh repo create [<name>] [flags]

DESCRIPTION

Create a new GitHub repository.

To create a repository interactively, use gh repo create with no arguments.

To create a remote repository non-interactively, supply the repository name and one of --public, --private, or --internal. Pass --clone to clone the new repository locally.


If the `OWNER/` portion of the `OWNER/REPO` name argument is omitted, it

defaults to the name of the authenticating user.

To create a remote repository from an existing local repository, specify the source directory with --source. By default, the remote repository name will be the name of the source directory. Pass --push to push any local commits to the new repository.

OPTIONS

Add a README file to the new repository

Clone the new repository to the current directory

Description of the repository

Disable issues in the new repository

Disable wiki in the new repository

Specify a gitignore template for the repository

Repository home page URL

Include all branches from template repository

Make the new repository internal

Specify an Open Source License for the repository

Make the new repository private

Make the new repository public

Push local commits to the new repository

Specify remote name for the new repository

Specify path to local repository to use as source

The name of the organization team to be granted access

Make the new repository based on a template repository

ALIASES

gh repo new

EXAMPLE

# create a repository interactively
gh repo create
# create a new remote repository and clone it locally
gh repo create my-project --public --clone

# create a new remote repository in a different organization gh repo create my-org/my-project --public # create a remote repository from the current directory gh repo create my-project --private --source=. --remote=upstream

SEE ALSO

gh-repo(1)

Jul 2024 GitHub CLI v2.53.0