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
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--staging-digest | string | Exact 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. | ||
--confirm | Explicitly acknowledge irreversible loss of all saved pending work; required in scripts too. |
Optional flags
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--repo | string | Local repository filesystem path. | ||
--personal | Use the configured personal repository. | |||
--format | FORMAT | json, tsv, csv, table | Output format for command results. | |
--env | PROFILE | Use a configured CLI profile for this invocation. | ||
--out | PATH | Write output to a file path, or use - for stdout. | ||
--open | Open browser-bound URLs when supported. | |||
--no-retry | Disable transient-error retries. | |||
--retry-max | N | Maximum transient-error retry attempts. | ||
--wait | Block on async operations until a terminal state is reached. | |||
--wait-timeout | SECONDS | 600 | Seconds to wait for --wait before timing out. Defaults to 600. | |
--allow-self | Allow mutating the currently active credential. | |||
--timeout | SECONDS | Set the per-request timeout budget in seconds. | ||
--idempotency-key | KEY | Reuse an Idempotency-Key so ambiguous write failures can be retried with the same key. | ||
--force | Force safety-gated operations where supported. | |||
--yes | Skip confirmation prompts for destructive operations. | |||
--debug | Print structured request debugging with secrets masked. | |||
--verbose | Print verbose progress for long-running operations. | |||
-h, --help | Show 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=jsonrepo:revert
Create a new local inverse commit for a target's supported reversible changes; node/edge latest-value fields are skipped, while a target containing an edge removal cannot be reverted because its prior content bytes are unavailable.
repo:status
Show local repository status, including the last verified user-requested backup for this checkout (last_backup), interrupted push, pull or purge (interrupted_sync), and an unpublished hosted remote (stranded_remote). A null last_backup means none recorded here, not no remote backups. Push and pull refuse while a rebase is paused or work is staged; interrupted_sync_refused then names why. Before rerunning an interrupted push, pull or purge, continue or abort the paused rebase, then commit or discard the staged work. Rerun the interrupted repo:push with the same --idempotency-key. If the server already accepted that push, the rerun records it: with unchanged local history the server replays the recorded outcome for that key, or nothing is sent if a repo:pull already brought that push in; after later commits or a repo:pull's rebase, the rerun publishes nothing new and reports already_accepted, and the commits still unpublished need a plain repo:push. Otherwise the rerun is an ordinary push. Rerun an interrupted purge with its node_id, --confirm and the same --idempotency-key. For an interrupted pull, run repo:pull again with any key; stranded_remote names the existing repo:push recovery flow.