gh repo create
gh repo create [<name>] [flags]
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. If the repo is bare, this will mirror all refs.
For language or platform .gitignore templates to use with --gitignore
, https://github.com/github/gitignore.
For license keywords to use with --license
, run gh repo license list
or visit https://choosealicense.com.
Options
-
--add-readme
- Add a README file to the new repository
-c
,--clone
- Clone the new repository to the current directory
-d
,--description <string>
- Description of the repository
-
--disable-issues
- Disable issues in the new repository
-
--disable-wiki
- Disable wiki in the new repository
-g
,--gitignore <string>
- Specify a gitignore template for the repository
-h
,--homepage <URL>
- Repository home page URL
-
--include-all-branches
- Include all branches from template repository
-
--internal
- Make the new repository internal
-l
,--license <string>
- Specify an Open Source License for the repository
-
--private
- Make the new repository private
-
--public
- Make the new repository public
-
--push
- Push local commits to the new repository
-r
,--remote <string>
- Specify remote name for the new repository
-s
,--source <string>
- Specify path to local repository to use as source
-t
,--team <name>
- The name of the organization team to be granted access
-p
,--template <repository>
- Make the new repository based on a template repository
ALIASES
gh repo new