repo:staging:discard

Discard all saved pending operations and associated values from only the selected local repository. Uncommitted work is not recoverable through graph history. Optional repo:backup preserves the batch, but restoring it does not repair invalid staging. No backup is required or created automatically; no export or network transfer occurs. Discard is never implicit in reads, edits, validation, failed commit, pull, push, revert, startup, migration, or upgrade.

Reference for flywheel repo:staging:discard.

Remove all saved pending operations and associated value records from only the selected local repository. This uncommitted work is not recoverable through graph history.

Read flywheel repo:status --format=json and copy staging.digest exactly. Status works without replaying an invalid batch. Supply that value with --staging-digest and acknowledge the loss with --confirm, including in scripts. A stale digest or concurrent workspace change fails without discarding another batch; matching empty staging succeeds with zero discarded operations. There is no partial discard, alternate spelling, --force, or prompt fallback.

Optionally preserve the repository first with flywheel repo:backup <destination> --repo <path>. Backup is a separate existing command, not a prerequisite. Its archive includes the staging row; restoring an invalid batch does not repair it. Discard creates no backup/export automatically, needs no credentials, and sends no data off the machine.

The result retains repository_id, discarded.staging_digest, discarded.operation_count, resulting.staging_digest, and resulting.operation_count in JSON and existing human/table/CSV/TSV formats. Resulting staging is canonical empty open state. Committed graph data/history, heads, objects, object mode/association, sync metadata, rebase/conflicts, and other repositories remain unchanged.

Discard is never implicit in reads, edits, validation, failed commit, pull, push, revert, startup, migration, or upgrade. After recovery, stage corrected work with existing authoring commands and record it with repo:commit. repo:push remains a separate explicit publication action.

Command Group

Local Repository

Summary

Discard all saved pending operations and associated values from only the selected local repository. Uncommitted work is not recoverable through graph history. Optional repo:backup preserves the batch, but restoring it does not repair invalid staging. No backup is required or created automatically; no export or network transfer occurs. Discard is never implicit in reads, edits, validation, failed commit, pull, push, revert, startup, migration, or upgrade.

Usage

flywheel repo:staging:discard <FLAGS>

Required flags

FlagValueDefaultChoicesDescription
--staging-digeststringExact staging.digest copied from repo:status --format=json. A stale digest refuses without changing pending work; inspect repo:status and confirm the current batch before choosing whether to discard it.
--confirmExplicitly acknowledge irreversible loss of all saved pending work; required in scripts too.

Optional flags

FlagValueDefaultChoicesDescription
--repostringLocal repository filesystem path.
--personalUse the configured personal repository.
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILEUse a configured CLI profile for this invocation.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--forceForce safety-gated operations where supported.
--yesSkip confirmation prompts for destructive operations.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow this help.

Examples

Discard all saved pending operations and associated values from only the selected local repository. Uncommitted work is not recoverable through graph history. Optional repo:backup preserves the batch, but restoring it does not repair invalid staging. No backup is required or created automatically; no export or network transfer occurs. Discard is never implicit in reads, edits, validation, failed commit, pull, push, revert, startup, migration, or upgrade.

flywheel repo:staging:discard --staging-digest=<staging-digest> --confirm --format=json