repo: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.
Reference for flywheel repo:revert.
repo:revert creates and records a new local inverse commit for a target commit's supported reversible changes; it does not add work to staging or rewrite history. It can invert structural operations and current artifact.properties.set.v1 property updates.
Node and edge latest-value field writes (node.field.set.v1, edge.field.set.v1) and the older artifact.metadata.set.v1 operation remain skipped. A target containing only those writes fails with repository_revert_no_reversible_operations before any mutation; a mixed target creates inverses for its supported operations and reports omitted fields in skipped_latest_fields. A target containing edge.remove.v1 is rejected with repository_revert_unsupported_operation because history does not retain the previous edge content bytes needed to recreate it.
To restore a desired latest-value field, write the known text with the ordinary edit command and make a new repo:commit; there is no history-restoration command for those values.
Command Group
Local Repository
Summary
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.
Usage
flywheel repo:revert [FLAGS] <commit_id>Arguments
| Argument | Required | Choices | Description |
|---|---|---|---|
<commit_id> | Yes | Canonical commit ID. |
Required flags
None.
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
Revert a commit with structural or artifact-property operations: creates a new inverse commit_id and head, plus skipped_latest_fields listing any latest-only fields also present in the target.
flywheel repo:revert <structural-commit-id> --repo <path> --format=jsonRevert a commit whose operations are only node.field.set.v1, edge.field.set.v1, or the legacy artifact.metadata.set.v1: fails with repository_revert_no_reversible_operations before any mutation; node, head, and staging stay unchanged.
flywheel repo:revert <content-only-commit-id> --repo <path> --format=jsonRevert a commit that updated artifact.properties.set.v1 values: current property updates are reversible, subject to the existing conflict rules.
flywheel repo:revert <artifact-properties-commit-id> --repo <path> --format=jsonrepo:restore
Restore a verified backup archive into an empty directory.
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.