diff --git a/pkg/cmd/repo/rename/rename.go b/pkg/cmd/repo/rename/rename.go index 3676f93fe..74523e2e7 100644 --- a/pkg/cmd/repo/rename/rename.go +++ b/pkg/cmd/repo/rename/rename.go @@ -49,9 +49,27 @@ func NewCmdRename(f *cmdutil.Factory, runf func(*RenameOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "rename []", Short: "Rename a repository", - Long: heredoc.Doc(`Rename a GitHub repository. + Long: heredoc.Docf(` + Rename a GitHub repository. + + %[1]s%[1]s is the desired repository name without the owner. + + By default, the current repository is renamed. Otherwise, the repository specified + with %[1]s--repo%[1]s is renamed. + + To transfer repository ownership to another user account or organization, + you must follow additional steps on GitHub.com - By default, this renames the current repository; otherwise renames the specified repository.`), + For more information on transferring repository ownership, see: + + `, "`"), + Example: heredoc.Doc(` + # Rename the current repository (foo/bar -> foo/baz) + $ gh repo rename baz + + # Rename the specified repository (qux/quux -> qux/baz) + $ gh repo rename -R qux/quux baz + `), Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.BaseRepo = f.BaseRepo