X Tutup
Skip to content

repo clone should support cloning into a specific directory #653

@agargiulo

Description

@agargiulo

Describe the feature or problem you’d like to solve

git clone ssh://git@github.com/user/repo.git user_repo allows you to specify a directory to clone into (user_repo here). gh repo clone supports passing extra arguments to git clone but when using this, it assumes my extra arg is the repo to clone not the path to clone into.

[14:59:59] % gh repo clone NARKOZ/gitlab -- narkoz_gitlab
fatal: repository 'narkoz_gitlab' does not exist
exit status 128

I saw mention in #545 about maybe adding support for this, so I figured I'd ask here for this feature.

Proposed solution

I'm not sure how many people (frequently) clone into directories that aren't just named after the project but something like gh repo clone agargiulo/stuff my_stuff would be helpful for when I find 3 different projects named the same and want to keep track more easily locally.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLI

    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

      X Tutup