Skip to main content

graft reset

Reset the current (non-main) branch to match main’s current tip commit. The branch directory is replaced with main’s tree.

Usage

Behavior

  1. Resolve main’s tip commit hash
  2. Load main’s tree entries
  3. Stop the container
  4. Materialize main’s files into the current branch directory (overwriting everything)
  5. Move the current branch’s ref to main’s tip
  6. Start the container

Example

Notes

  • This command only works when the active branch is not main
  • The reset is destructive to the branch’s working directory but the DAG history remains intact
  • To recover a reset branch’s previous state, roll back using the commit hash

Exit Codes