📣
TiDB Cloud Premium 开放公测中。为企业级工作负载提供无限扩展、即时弹性伸缩和高级安全保障。此页面由 AI 自动翻译,英文原文请见此处。

ti fs-git clone-git-workspace



将仓库克隆到已挂载的 Filesystem 路径中。数据填充可以同步运行,也可以在后台运行。

语法

ti fs-git clone-git-workspace --repo-url <string> --target-path <string> [--blobless] [--dry-run] [--file-system-id <string>] [--fs-token <string>] [--help] [--hydrate <string>] [--version]

选项

  • --repo-url <string>:Git 仓库 URL。[必需]
  • --target-path <string>:要克隆到的已挂载文件系统路径。[必需]
  • --blobless:创建无 blob 的部分本地 .git,并单独填充干净的 blob。
  • --dry-run:验证请求而不应用更改。
  • --file-system-id <string>:选择文件系统。你也可以设置 TI_FS_FILE_SYSTEM_ID
  • --fs-token <string>:设置 Filesystem 访问令牌。如果省略此选项,命令会使用 TI_FS_TOKEN 环境变量。如果两者都未提供,命令会使用为所选 Filesystem 在本地存储的令牌。
  • --help:显示帮助信息。
  • --hydrate <string>:干净数据填充模式:autobackgroundsyncoff。使用 auto 时,无 blob 克隆会在后台进行填充,而非无 blob 克隆不会运行单独的填充步骤。backgroundsync 需要 --bloblessoff 会跳过填充。[默认值:auto]
  • --version:显示版本信息。

有关所有命令共享的选项,请参见全局选项

示例

  • 正常克隆一个仓库:

    # Create a complete Git checkout in the mounted Filesystem path. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb
  • 立即启动一个无 blob 工作区:

    # Expose the repository tree while clean Git objects hydrate in the background. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb --blobless --hydrate background
  • 等待无 blob 填充完成:

    # Keep the clone command running until clean Git objects finish hydrating. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb --blobless --hydrate sync

文档内容是否有帮助?