sync

Sync a Git-Spice repository with its remote trunk and clean merged branches.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents stack drift by ensuring your Git-Spice repository stays synchronized with its remote trunk and by cleaning up merged Change Request branches.

Core Features & Use Cases

  • Git-Spice stack synchronization: Pulls latest remote changes while preserving the stack model.
  • Restack after sync: Uses restacking to resolve ordering and integration needs that arise after pulling trunk updates.
  • Branch hygiene: Deletes merged Change Request branches and reports what was updated.

Quick Start

Use the sync skill to synchronize your Git-Spice repository with its remote trunk and restack the current stack as needed by running the command gs repo sync --restack.

Frequently Asked Questions about sync

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

FAQPage Schema
How do I sync a Git-Spice stack with the remote trunk?

To sync a Git-Spice stack with the remote trunk, run the command `gs repo sync` or its shorthand `gs rs`. This pulls the latest remote changes while preserving your stack model and maintaining consistent branch state.

What is the best way to prevent stack drift in Git-Spice?

Preventing stack drift in Git-Spice requires synchronizing your repository with its remote trunk and cleaning up merged Change Request branches. The sync skill automates this process to ensure your stack state remains consistent without manual git pull workflows.

Can I restack a Git-Spice stack after pulling trunk updates?

Yes, you can restack a Git-Spice stack after pulling trunk updates by running `gs repo sync --restack`. This handles restack conflict resolution and addresses ordering and integration needs that arise after synchronizing with the remote.

Does Git-Spice automatically delete merged Change Request branches during synchronization?

Yes, Git-Spice automatically deletes merged Change Request branches during synchronization. The sync skill performs branch hygiene by removing merged branches and reporting a summary of remote updates plus deleted and synchronized branches.

Why does my Git-Spice stack need restacking after a sync trigger?

Your Git-Spice stack needs restacking after a sync trigger because pulling remote trunk updates can disrupt branch ordering and integration. Restacking resolves these conflicts and ensures the stack state remains consistent without requiring manual rebase workflows.