1 个不稳定版本
0.2.0 | 2022 年 4 月 24 日 |
---|
#10 in #leverage
19KB
379 行代码(不包括注释)
git-repo-clone (grc)
正确克隆 Git 仓库的方法
什么是 grc?
Git Repo Clone 是一个工具,它利用模糊查找与 Github API 的搜索功能。这允许即使不知道仓库或所有者的确切名称,也能找到您想要的精确仓库,然后对这些结果进行模糊查找。
使用方法
必须安装 Git。使用 grc --help
USAGE:
grc [OPTIONS] [ARGS] [SUBCOMMAND]
ARGS:
<repository> The repository name to search for
<git args>... All additional git args. After all other options pass `--` and then the git
args. Eg `grc rust -- --bare
OPTIONS:
-h, --help Print help information
-l, --limit <limit> The number of repositories to query and list: default=30
-n, --new <new name> A custom name for renaming the repository
-o, --owner <owner> The owner account to search through
-O, --ownersearch <owner search> Search for an owner if the exact name isn't known and get
their repos
-p, --path <path> The full path to the parent folder to clone into
-V, --version Print version information
SUBCOMMANDS:
default-config Configure your defaults
配置默认设置
USAGE:
grc default-config --username <username> --path <clone path>
OPTIONS:
-h, --help Print help information
-p, --path <clone path> The default path to clone repositories into when none is specified.
If this is blank and none is specified it will clone into the
current folder
-u, --username <username> The default username to search for when no other search parameters
are given
安装
Cargo
使用 cargo install git-repo-clone
或
从源代码安装
克隆仓库并使用以下命令安装:cargo install --path . --force
依赖项
~16–28MB
~465K SLoC