snippetbashTip
gh repo create — Create a new GitHub repository. Note: `--public`, `--private`, or `--internal` is required when not
Viewed 0 times
createcommandnotenewgithubcligh repo createrepository
Problem
How to use the
gh repo create command: Create a new GitHub repository. Note: --public, --private, or --internal is required when not running interactively. More information: <https://cli.github.com/manual/gh_repo_create>.Solution
gh repo create — Create a new GitHub repository. Note: --public, --private, or --internal is required when not running interactively. More information: <https://cli.github.com/manual/gh_repo_create>.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|--internal}}Code Snippets
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|--internal}}Context
tldr-pages: common/gh repo create
Revisions (0)
No revisions yet.