Skip to content

Commit ca1f2a4

Browse files
Merge pull request cli#9309 from jessehouwing/docs/gh-repo-create-owner
docs: Update documentation for `gh repo create` to clarify owner
2 parents db733e1 + 3b2ba9e commit ca1f2a4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/cmd/repo/create/create.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
8888
To create a remote repository non-interactively, supply the repository name and one of %[1]s--public%[1]s, %[1]s--private%[1]s, or %[1]s--internal%[1]s.
8989
Pass %[1]s--clone%[1]s to clone the new repository locally.
9090
91+
If the %[1]sOWNER/%[1]s portion of the %[1]sOWNER/REPO%[1]s name argument is omitted, it
92+
defaults to the name of the authenticating user.
93+
9194
To create a remote repository from an existing local repository, specify the source directory with %[1]s--source%[1]s.
9295
By default, the remote repository name will be the name of the source directory.
9396
Pass %[1]s--push%[1]s to push any local commits to the new repository.
@@ -99,6 +102,9 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
99102
# create a new remote repository and clone it locally
100103
gh repo create my-project --public --clone
101104
105+
# create a new remote repository in a different organization
106+
gh repo create my-org/my-project --public
107+
102108
# create a remote repository from the current directory
103109
gh repo create my-project --private --source=. --remote=upstream
104110
`),

0 commit comments

Comments
 (0)