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

ArgumentRequiredChoicesDescription
<commit_id>YesCanonical commit ID.

Required flags

None.

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

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=json

Revert 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=json

Revert 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=json