Skip to content

support gitflags in gh repo fork #2236

@fregante

Description

@fregante

Describe the feature or problem you’d like to solve

I want to create a fork and then clone it locally shallowly. This is not possible since gh repo fork --clone does not provide any options and does not return the repo name in a clean way.

Proposed solution

gh repo clone -- --depth 1 --single-branch $(gh repo fork --clone=false)

or accept gitflags like gh repo clone does

gh repo fork --clone -- --depth 1 --single-branch

How will it benefit CLI and its users?

This speeds up the cloning progress. Adding support for gitflags will also align repo fork with repo clone

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions