LinuxCommandLibrary

gh-repo-create

Create new GitHub repositories

TLDR

Create repo interactively

$ gh repo create
copy
Create from current directory
$ gh repo create [name] --source=.
copy
Create empty repo
$ gh repo create [name] --public
copy
Create private repo
$ gh repo create [name] --private
copy
Create from template
$ gh repo create [name] --template [owner/template]
copy
Clone after creating
$ gh repo create [name] --clone
copy
Create with description
$ gh repo create [name] -d "[description]"
copy

SYNOPSIS

gh repo create [name] [options]

DESCRIPTION

gh repo create creates GitHub repositories from the command line with support for multiple creation workflows. It can create empty repositories, initialize from the current directory, or instantiate from repository templates.
When run interactively without arguments, the command guides you through repository creation with prompts for visibility, description, and initialization options. The --source flag publishes an existing local git repository to GitHub. Template repositories (--template) provide starter configurations for common project types.

PARAMETERS

--public

Make public.
--private
Make private.
--internal
Make internal.
--source dir
Create from local directory.
--template repo
Create from template.
--clone
Clone after creating.
-d, --description text
Description.
--homepage url
Homepage URL.
--gitignore template
Add .gitignore.
--license license
Add license.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community