Revert Command

The revert command allows you to return to a previous state of your system.

Usage

ocuroot revert [ref] [flags]

Description

The revert command helps you roll back to a previous known state. This is useful for:

  • Rolling back failed deployments
  • Undoing problematic changes
  • Testing previous configurations
  • Emergency recovery

Arguments

  • ref: Reference to revert to (commit hash, tag, or relative reference)

Flags

  • --force: Force revert without confirmation

Examples

# Revert to a specific commit
ocuroot revert abc123

# Force revert to previous state
ocuroot revert HEAD~1 --force

Safety Considerations

  • Always verify the target state before reverting
  • Take backups before major reverts
  • Document the reason for reverting
  • checkout: Switch to a different state
  • sync: Synchronize state with server