Undo last GitButler operation
Reverts the last GitButler operation to restore the previous workspace state.
/plugin marketplace add aheritier/boost-your-ai/plugin install gitbutler@boost-your-aiUndo the last GitButler operation. This is a safe, reversible way to recover from mistakes.
First, verify this is a GitButler workspace:
Current branch: !`git branch --show-current`
If the branch is NOT gitbutler/workspace, STOP and inform the user:
"This directory is not a GitButler workspace. Please run
butto initialize GitButler first, or use standard git commands."
Show recent operations from the oplog:
!`but oplog 2>&1 | head -20 || echo "GitButler not available"`
"This will undo: [operation description]. Proceed?"
but undo# Undo last operation
but undo
# View operation history
but oplog
# Restore to specific point (for multi-step undo)
but restore <sha> --force
GitButler tracks all operations in its oplog:
For undoing multiple operations:
but oplog to see historybut restore <sha> --forceOr use /gitbutler:checkpoint proactively to create named restore points.
but restore to a specific checkpoint/gitbutler:checkpoint to create named save points/gitbutler:checkpoint - Create named restore points proactively/gitbutler:squash - Common operation you might want to undo/gitbutler:move - Common operation you might want to undo