branch-switch

Switch Git branches while preserving uncommitted changes via stashes.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Reidond/Banshee --skill branch-switch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-switch
Source: https://github.com/Reidond/Banshee/tree/main/.claude/skills/branch-switch
Command: npx skills add https://github.com/Reidond/Banshee --skill branch-switch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents data loss and workflow disruption when changing Git branches by safely managing uncommitted changes and stash operations.

Core Features & Use Cases

  • Safe Branch Switching: Checks repository state, handles dirty worktrees, and switches branches without discarding user changes.
  • Stash Management: Creates, verifies, applies, and reviews stashes while detecting possible conflicts before restoration.
  • Use Case: When moving from a feature branch to another task while preserving unfinished edits, use this Skill to stash changes, switch branches, and optionally restore work.

Quick Start

Use the branch-switch skill to safely move my current work to the target branch while preserving uncommitted changes.

Frequently Asked Questions about branch-switch

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

FAQPage Schema
How do I switch Git branches without losing uncommitted changes?

To switch Git branches without losing uncommitted changes, the Skill checks your repository state and safely stashes dirty worktree modifications before switching, preventing accidental data loss. It manages the entire stash creation and application process for you.

What is the best way to handle Git stash conflicts when moving to a new branch?

Handling Git stash conflicts when moving to a new branch requires verifying stash creation and detecting possible restoration conflicts before applying them. This Skill performs stash verification and cautious recovery procedures to safely restore your work.

Can I move unfinished work to a target branch while preserving my current edits?

You can move unfinished work to a target branch while preserving edits by using workflow automation to stash changes, switch branches, and optionally restore work. The Skill validates branches and applies stashes without discarding user modifications.

Does switching branches with a dirty worktree require manual stash management?

Switching branches with a dirty worktree does not require manual stash management when using this Skill. It automatically handles dirty worktrees by performing status checks, creating stashes, and applying cautious recovery procedures to prevent workflow disruption.

Why does Git stash application fail and how can I prevent data loss?

Git stash application fails due to unresolved conflicts or invalid branch states, causing potential data loss. This Skill prevents data loss by executing stash verification, branch validation, and conflict detection before attempting to restore your uncommitted changes.