spinoff

Create a git worktree from main and migrate stashed changes.

1|4|Updated Oct 27, 2014
One-click install
npx skills add https://github.com/rjernst/dotfiles --skill spinoff-rjernst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spinoff
Source: https://github.com/rjernst/dotfiles/tree/main/claude/skills/spinoff
Command: npx skills add https://github.com/rjernst/dotfiles --skill spinoff-rjernst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of continuing the same work in a fresh branch/workspace without polluting the current branch with dirty changes or missing important context.

Core Features & Use Cases

  • Branch-based worktree setup: Creates a new worktree for a new branch always branched from main, even when invoked from a different branch.
  • Dirty-file migration: Stashes staged, unstaged, and untracked changes (git stash -u) and applies them to the new worktree immediately after creation to preserve work-in-progress.
  • Optional context transfer: Prompts you to decide whether to summarize and transfer conversation context into a /tmp/spinoff-context-<branch>.md file for the new workspace session.

Quick Start

Tell the assistant “/spinoff” and provide a branch name when prompted to open your work in a new workspace with your dirty files moved over.

Frequently Asked Questions about spinoff

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

FAQPage Schema
How do I move uncommitted changes to a new git branch?

To move uncommitted changes to a new git branch, you can use a workspace automation approach that stashes staged, unstaged, and untracked files, then applies them to a dedicated worktree branched from main.

What is a git worktree and when do I need it for branching?

A git worktree is a linked working directory that lets you split ongoing development into an isolated effort. You need it to continue work in a fresh branch workspace without contaminating the original branch with dirty changes.

Can I transfer conversation context when creating a git worktree?

Yes, you can transfer conversation context when creating a git worktree by optionally summarizing it into a temporary markdown file for the new workspace session to preserve important project details.

Does git stash include untracked files when migrating work to a new branch?

Git stash includes untracked files when migrating work to a new branch by using the -u flag, ensuring all staged, unstaged, and untracked changes are preserved and applied immediately after worktree creation.

What is the best way to isolate work-in-progress without losing context?

The best way to isolate work-in-progress without losing context is creating a dedicated branch worktree from main, migrating dirty files via stash, and optionally writing a sanitized context summary for the new session.

Why does my new worktree branch from main instead of my current branch?

New worktree branches always originate from main to provide a clean baseline for your isolated effort, preventing contamination from the current branch's dirty state while preserving your in-progress changes through stash migration.