1 个稳定版本
1.0.0 | 2024年1月10日 |
---|
#6 在 #removing
7KB
96 行
gitless
Gitless 是一个命令行界面 (CLI) 工具,它简化了从 Git 仓库克隆和 degitting 的过程。它简化了克隆仓库和移除其 Git 历史记录的过程,仅留下代码的最新状态。
安装
作为 cli
cargo install gitless
作为 lib
cargo add `gitless`
cli 使用方法
Usage: gitless [OPTIONS] --url <URL> --dest <DEST_PATH>
Options:
-u, --url <URL> Git URL you would like to clone and degit from
--dest <DEST_PATH> Destination of cloned and degitted path
-b, --branch <BRANCH> Git branch or tag to clone and degit from
-r, --rev <REV> Git commit hash to clone and degit from
-h, --help Print help
注意事项
- 如果没有提供
--branch
或--rev
,则工具将克隆仓库的默认分支。 - 请确保指定的目标路径有效且可访问。
- 使用 `--rev`` 选项时请谨慎,因为它将在指定的提交处 degit 仓库,可能导致 HEAD 分离状态。
- Gitless 与 Git 或任何 Git 托管服务无关。请自行决定使用。
依赖项
~11MB
~275K SLoC