📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ti fs-git clone-git-workspace



Clones a repository into a mounted Filesystem path. Hydration can run synchronously or in the background.

Syntax

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]

Options

  • --repo-url <string>: Git repository URL. [required]
  • --target-path <string>: The mounted file system path to clone into. [required]
  • --blobless: Create a blobless partial local .git and hydrate clean blobs separately.
  • --dry-run: Validate the request without applying changes.
  • --file-system-id <string>: Select the file system. You can also set TI_FS_FILE_SYSTEM_ID.
  • --fs-token <string>: Set the file system user token. If omitted, uses TI_FS_TOKEN.
  • --help: Display help information.
  • --hydrate <string>: Blobless hydrate mode: auto, background, sync, or off. [default: auto]
  • --version: Display version information.

For options shared by all commands, see Global options.

Examples

  • Clone a repository normally:

    # 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
  • Start a blobless workspace immediately:

    # 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
  • Wait for blobless hydration:

    # 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

Was this page helpful?