restack

Restack Git-Spice branch stacks and resolve rebase conflicts automatically.

1|1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/luan/agents --skill restack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restack
Source: https://github.com/luan/agents/tree/main/pi/agent/extensions/git-tool/skill-resources/git-spice/restack
Command: npx skills add https://github.com/luan/agents --skill restack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restacking Git-Spice branches and manually resolving rebase conflicts can waste time and introduce mistakes when branch stacks drift or conflict.

Core Features & Use Cases

  • Restack onto bases: Moves Git-Spice branch history onto the updated bases using the Git-Spice workflow rather than raw git rebase.
  • Conflict-resolution loop: Guides you through resolving conflicts by reading full conflicted files, removing all conflict markers, and continuing as indicated by the CLI output.
  • Clear outcome reporting: Summarizes which branches were restacked and which conflicts were resolved, plus any blockers if resolution is ambiguous.

Quick Start

Ask the agent to run the Git-Spice command to restack your stack and then iteratively resolve any conflicts until the workflow completes.

Frequently Asked Questions about restack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restack Git-Spice branches after they drift from their base?

You can automatically restack Git-Spice branch stacks onto their updated bases by running the stack restack command, which moves branch history without relying on raw git rebase workflows.

How do I resolve rebase conflicts automatically during a branch stack workflow?

Automatic conflict resolution during a stack workflow involves reading full conflicted files, removing all conflict markers completely, staging resolved files, and continuing based on CLI instructions.

What is the difference between restacking branch stacks and running a standard git rebase?

Restacking branch stacks uses Git-Spice stack contracts to update branches out of date with their bases, whereas standard git rebase does not inherently handle stacked branch relationships or iterative conflict resolution loops.

Can I use branch stack restacking for branches with conflicts on main?

Yes, branch stack restacking handles scenarios like rebase on main and branches-with-conflicts by iteratively guiding conflict resolution until the workflow completes successfully.

What happens if conflict resolution is ambiguous during a Git-Spice restack?

If conflict resolution is ambiguous, the restack workflow reports clear blockers and summarizes which branches were restacked and which conflicts remain unresolved.