Skip to content

gh repo clone without upstream #8274

@ebarzilay-godaddy

Description

@ebarzilay-godaddy

Describe the bug

gh repo clone has a -u/--upstream-remote-name flag for changing the default upstream branch name, but there should also be an option to disable fetching the upstream branch.

This is useful when there's different permissions for the upstream repo, which can lead to some very confusing behavior: the clone command runs for a while and shows a permission error, but the contents is actually there. This is confusing since the error doesn't show the repo in question.

It could also be related to #8273 -- if there's a way to disable the upstream branch, it would make more sense to default to the actual repo when working with a fork.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-reporelating to the gh repo commandhelp wantedContributions welcome

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions