Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions pages/common/gh-repo-create.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# 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 new repository with a specified name and description:

`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}"`

- Create a private repository from the current directory:

`gh repo {{[new|create]}} {{[-s|--source]}} . --private`

- Clone the new repository locally after creation:
- Create a public repository from the current directory:

`gh repo {{[new|create]}} {{[-s|--source]}} . --public`

`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}}`
- Create a public repository with a specified name and description:

- Push the current directory to a new GitHub repository:
`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}" --public`

`gh repo {{[new|create]}} {{[-s|--source]}} . --public`
- Clone the new repository locally after creation:

`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}} {{--public|--private|--internal}}`
4 changes: 2 additions & 2 deletions pages/common/gh-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
> Work with GitHub repositories.
> More information: <https://cli.github.com/manual/gh_repo>.

- Create a new repository (if the repository name is not set, the default name will be the name of the current directory):
- Create a new repository interactively:

`gh repo {{[new|create]}} {{name}}`
`gh repo {{[new|create]}}`

- Clone a repository:

Expand Down