gh repo create
Create a new repository
Synopsis
Create a new GitHub repository.
gh repo create [<name>] [flags]
Examples
# create a repository under your account using the current directory name
$ gh repo create
# create a repository with a specific name
$ gh repo create my-project
# create a repository in an organization
$ gh repo create cli/my-project
Options
-y, --confirm Confirm the submission directly
-d, --description string Description of repository
--enable-issues Enable issues in the new repository (default true)
--enable-wiki Enable wiki in the new repository (default true)
-h, --homepage string Repository home page URL
--internal Make the new repository internal
--private Make the new repository private
--public Make the new repository public
-t, --team string The name of the organization team to be granted access
-p, --template string Make the new repository based on a template repository
Options inherited from parent commands
--help Show help for command
In use
With no arguments
Inside a git repository, and with no arguments, `gh` will automatically create a repository on GitHub on your account for your current directory, using the directory name.
# Create a repository for the current directory.
~/Projects/my-project$ gh repo create
✓ Created repository user/my-project on GitHub
✓ Added remote https://github.com/user/my-project.git
~/Projects/my-project$
Setting a repository name
Enter a name to set a repository name other than the directory name.
# Create a repository in your organization
~/Projects/my-project$ gh repo create my-cool-project
✓ Created repository user/my-cool-project on GitHub
✓ Added remote https://github.com/user/my-cool-project.git
~/Projects/my-project$
Setting your organization as an owner
Use OWNER/REPO syntax to create a repository under an organization that you are a part of.
# Create a repository in your organization
~/Projects/my-project$ gh repo create org/repo
✓ Created repository org/repo on GitHub
✓ Added remote https://github.com/org/repo.git
~/Projects/my-project$
With flags
Use flags to choose your repository settings.
# Create a repository using flags
~/Projects/my-project$ gh repo create --enable-issues=false --public
✓ Created repository user/my-project on GitHub
✓ Added remote https://github.com/user/my-project.git
~/Projects/my-project$

