← 返回命令列表

Linux command

hub-clone 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Clone with shorthand

hub clone [user/repo]

Clone to directory

hub clone [user/repo] [directory]

Clone with depth

hub clone --depth [1] [user/repo]

Clone own repository

hub clone [repo-name]

说明

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.

参数

--depth _N_
Shallow clone depth.
-b _BRANCH_
Checkout branch.
--help
Display help information.

FAQ

What is the hub-clone command used for?

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.

How do I run a basic hub-clone example?

Run `hub clone [user/repo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --depth _N_ do in hub-clone?

Shallow clone depth.