gt:restack

Rebase Graphite stacked branches onto updated parents and resolve merge conflicts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of getting a Graphite (stacked) branching workflow back in sync with updated parent branches while safely handling merge conflicts.

Core Features & Use Cases

  • Stack rebasing onto updated parents: Rebase the branch stack onto the latest main/trunk state to keep branches current.
  • Deterministic conflict resolution loop: Repeatedly read conflicted files fully, resolve all conflict markers in a single edit per file, stage fixes, and continue until the whole stack is rebuilt.
  • Operational safety guardrails: Instructs you to replace git rebase usage with this skill and provides an abort path if resolution is ambiguous.

Quick Start

Ask the agent to run gt:restack to restack your Graphite branch stack onto the latest main/trunk and resolve any merge conflicts.

Frequently Asked Questions about gt:restack

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

FAQPage Schema
How do I rebase a stacked branch workflow onto an updated main trunk?

Stacked branch synchronization requires rebasing branches onto updated parents and resolving merge conflicts iteratively. You read conflicted files fully, resolve all markers in a single edit, stage fixes, and continue until the whole stack is rebuilt.

What is the best way to resolve merge conflicts across multiple dependent branches?

Resolving merge conflicts across dependent branches requires a deterministic resolution loop. You read conflicted files fully, resolve all conflict markers in a single edit per file, git stage the fixes, and continue until no conflicts remain across the stack.

Can I sync out-of-date branches with main without manual git rebase commands?

Syncing out-of-date branches with main involves an automated restacking process that replaces manual git rebase commands. It handles the iterative conflict resolution and branch synchronization automatically to keep your stack current.

What should I do if merge conflict resolution becomes ambiguous during branch synchronization?

When merge conflict resolution becomes ambiguous during branch synchronization, you should trigger an abort path. This safety guardrail halts the rebase loop to prevent incorrect conflict marker resolution and potential data loss.

Does restacking a Graphite stacked-branch workflow support full-file reads for conflict resolution?

Yes, restacking a Graphite stacked-branch workflow requires full-file reads for conflict resolution. The deterministic conflict resolution loop mandates reading conflicted files completely before resolving all markers in a single edit per file.