Undo last GitButler operation or restore to snapshot
Undoes last GitButler operation or restores to a specific snapshot.
/plugin marketplace add settlemint/agent-marketplace/plugin install crew@settlemint[snapshot sha - optional]git/butler/<butler_context>
!${CLAUDE_PLUGIN_ROOT}/scripts/git/gitbutler-context.sh
</butler_context>
Undo the last GitButler operation or restore to a specific snapshot.
</objective> <workflow>If GITBUTLER_ACTIVE=false:
GitButler is not initialized. Use git reflog for recovery.
Exit if not active.
but oplog
If no argument provided:
AskUserQuestion({
questions: [
{
question: "What would you like to do?",
header: "Action",
options: [
{
label: "Undo last operation (Recommended)",
description: "Revert the most recent change",
},
{
label: "Restore to specific snapshot",
description: "Pick a point from the operation log",
},
{ label: "Create manual snapshot", description: "Save current state" },
],
multiSelect: false,
},
],
});
Undo last:
but undo
Restore to snapshot:
but restore ${snapshotSha}
Create snapshot:
but snapshot -m "manual checkpoint before risky operation"
but branch list
but oplog | head -5
</workflow>
<success_criteria>
</success_criteria>