gh repo create Create a new repository on GitHub
Makes a new repository on your account or organisation. It can be created from scratch, from a local folder you already have, or from a template.
Synopsis
gh repo create [NAME] [FLAGS]
Common options
| Option or form | What it does |
|---|---|
--public | --private | --internal | Who can see the repository (required when not interactive) |
-c, --clone | Clone the new repository |
-s, --source PATH | Use an existing local folder as the source |
--push | Push the commits from the source folder |
-r, --remote NAME | Name of the remote to add (with --source) |
-d, --description TEXT | A short description |
-p, --template REPO | Create from a template repository |
Examples
gh repo create
gh repo create my-site --private --clone
gh repo create my-site --public --source=. --remote=origin --push
gh repo create acme/website --private
gh repo create new-app --private --template acme/starter
Notes
- Repository names can contain letters, digits, hyphens, underscores and dots.
- Your folder must already be a git repository with at least one commit if you use --source with --push.
- Delete a repository with gh repo delete. It is permanent and needs a special permission.
See also
Last reviewed 2026-10-09.