LinuxCommandLibrary

hub-clone

clones GitHub repositories using shorthand notation

TLDR

Clone with shorthand

$ hub clone [user/repo]
copy
Clone to directory
$ hub clone [user/repo] [directory]
copy
Clone with depth
$ hub clone --depth [1] [user/repo]
copy
Clone own repository
$ hub clone [repo-name]
copy

SYNOPSIS

hub clone [options] repository [directory]

DESCRIPTION

hub clone clones GitHub repositories using shorthand notation. It expands user/repo format to full GitHub URLs automatically.
The command supports cloning your own repositories with just the repo name. It wraps git clone with GitHub-specific conveniences.

PARAMETERS

REPOSITORY

GitHub repository (user/repo or just repo).
DIRECTORY
Target directory.
--depth N
Shallow clone depth.
-b BRANCH
Checkout branch.
--help
Display help information.

CAVEATS

Part of hub tool. Superseded by gh repo clone. Requires GitHub authentication.

HISTORY

hub clone is part of hub, GitHub's original CLI tool before the official gh CLI.

SEE ALSO

hub(1), git-clone(1), gh(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community