gh repo create
all
Create a new GitHub repository. Note: `--public`, `--private`, or `--internal` is required when not running interactively.
More info →Options (4)
booleanCreate a new repository interactively
Example:
gh repo {{[new|create]}}-s, --sourcebooleanCreate a private repository from the current directory
Example:
gh repo {{[new|create]}} {{[-s|--source]}} . --private-d, --descriptionbooleanCreate a public repository with a specified name and description
Example:
gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}" --public-c, --clonebooleanClone the new repository locally after creation
Example:
gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}} {{--public|--private|--internal}}Examples (5)
Create a new repository interactively
gh repo [new|create]Create a private repository from the current directory
gh repo [new|create] [-s|--source] . --privateCreate a public repository from the current directory
gh repo [new|create] [-s|--source] . --publicCreate a public repository with a specified name and description
gh repo [new|create] repo_name [-d|--description] "repo_description" --publicClone the new repository locally after creation
gh repo [new|create] repo_name [-c|--clone] --public|--private|--internalmade by @shridhargupta | data from tldr-pages