lgh_rollback
Roll back a local repository by N commits using git reset --hard, discarding uncommitted changes and rolled-back commits. Inspect what would be lost with diff/dry-run, or back up first, before executing.
Instructions
Roll the repository back N commits by running git reset --hard HEAD~N. Destructive: uncommitted changes and the rolled-back commits are discarded from the local branch, so run lgh_up or lgh_save first if anything there is worth keeping. With push enabled it also force-pushes the reset state to the LGH server so the backup matches; without push only the local branch moves. Returns JSON with from_commit, to_commit, rolled_back (the discarded commit's subject), and push success. Use lgh_diff or lgh_up_dryrun to inspect what would be lost before rolling back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute path to the LOCAL working directory (defaults to current directory) | |
| push | No | Force push to LGH after rollback (default: false) | |
| steps | No | Number of commits to roll back (default: 1) |