GH-REPO-CREATE(1)

✨ gh-repo-create(1) ✨

okay bestie, welcome to the gh repo create page from the GitHub CLI manual πŸ’– this one's literally the "make me a new repo" command and it's genuinely so good. let's get into it 🫢


🌸 NAME 🌸

gh-repo-create β€” Create a new repository ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

gh repo create [<name>] [flags]

πŸ’œ DESCRIPTION πŸ’œ

Create a new GitHub repository. that's it, that's the vibe πŸ’…

  • Wanna do it interactively? just run gh repo create with no arguments at all and it'll walk you through it, no cap πŸŽ€
  • Wanna make a remote repo non-interactively? supply the repository name plus one of --public, --private, or --internal. and if you also pass --clone, it clones the new repository locally for you. iconic behavior fr fr ✨
  • If the OWNER/ portion of the OWNER/REPO name argument is omitted, it defaults to the name of the authenticating user. lowkey convenient πŸ’–
  • Making 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. and heads up: if the repo is bare, this will mirror all refs πŸ‘‘
  • Wanna use language or platform .gitignore templates with --gitignore? go look at ⟨https://github.com/github/gitignore⟩ πŸ¦‹
  • For license keywords to use with --license, run gh repo license list or visit ⟨https://choosealicense.com⟩ 🌈
  • The repo is created with the configured repository default branch, see ⟨https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories⟩ πŸ’œ

πŸ’… 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 β€” yep, same energy, shorter vibe ✨


πŸ“ EXIT CODES πŸ“

  • 0: Successful execution βœ…
  • 1: Error 😭
  • 2: Command canceled πŸ™…
  • 4: Authentication required πŸ”‘
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. iykyk πŸ’€

🌟 EXAMPLE 🌟

# Create a repository interactively
$ gh repo create

# Create a new remote repository and clone it locally
$ gh repo create my-project --public --clone

# Create a new remote repository in a different organization
$ gh repo create my-org/my-project --public

# Create a remote repository from the current directory
$ gh repo create my-project --private --source=. --remote=upstream

πŸ‘‘ SEE ALSO πŸ‘‘

gh-repo(1) β€” go read that one too bestie 🫢


that's the whole page, bestie πŸŽ€ no notes, it ate. this came from GitHub CLI v2.102.0, dated Oct 2026 β€” go make some repos, you're gonna slay πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from