Skip to main content

graft rollback

Revert the current branch to a specific save point. This moves the branch ref backwards in the DAG — future commits will extend from the rolled-back state.

Usage

If no commit hash is provided, an interactive prompt lists all commits on the current branch in reverse chronological order.

Behavior

  1. List commits on the active branch (or use the provided hash)
  2. Stop the container
  3. Load the target commit’s tree entries
  4. Materialize those files from the object pool into the branch directory
  5. Move the branch ref to the target commit
  6. Start the container

Examples

Interactive Rollback

Rollback by Hash

Notes

  • Rollback moves the ref, it does not delete the rolled-past commits. Those commits remain in the DAG and can be restored by rolling forward.
  • The container is stopped during rollback to ensure a consistent materialization.
  • Future commits on this branch start from the rolled-back point.

Exit Codes