ti fs-git remove-git-worktree
Removes a linked Git worktree while preserving the shared Git data used by other worktrees.
Syntax
ti fs-git remove-git-worktree
--worktree-path <string>
[--dry-run]
[--file-system-id <string>]
[--force]
[--fs-token <string>]
[--help]
[--version]
Options
--worktree-path <string>: Mountedti fspath of the linked worktree. [required]--dry-run: Validate the request without applying changes.--file-system-id <string>: Select the file system. You can also setTI_FS_FILE_SYSTEM_ID.--force: Remove even when the linked worktree has local changes.--fs-token <string>: Set the Filesystem token. If omitted, the command uses theTI_FS_TOKENenvironment variable. If neither is provided, the command uses the local token stored for the selected Filesystem.--help: Display help information.--version: Display version information.
For options shared by all commands, see Global options.
Examples
Remove a Git worktree:
# Remove a clean linked worktree. ti fs-git remove-git-worktree --file-system-id <file-system-id> --worktree-path /path/to/workspace/tidb-featureForce removal of a Git worktree:
# Discard local changes only after deciding that they are no longer needed. ti fs-git remove-git-worktree --file-system-id <file-system-id> --worktree-path /path/to/workspace/tidb-feature --force