railima

Stack Sync — Git skill for Claude Code

Git community

Cascade-rebase the current branch and all its descendants onto the new main, after a parent PR has merged.

How to install Stack Sync

Installs to ~/.claude/skills/railima-claude-personal-skills-stack-sync/SKILL.md

Terminal
mkdir -p ~/.claude/skills/railima-claude-personal-skills-stack-sync && curl -fsSL https://raw.githubusercontent.com/railima/claude-personal-skills/HEAD/commands/stack-sync.md -o ~/.claude/skills/railima-claude-personal-skills-stack-sync/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Stack Sync does

Cascade-rebase the current branch and all its descendants onto the new `main`, after a parent PR has merged. Use this when the root of your stack just merged on GitHub.

Steps:

  1. Pre-flight checks:
    • Confirm git version >= 2.38 (for --update-refs): git --version. If older, follow the "Fallback" section at the bottom of this file.
    • Confirm clean working tree: git status --short. If anything is staged or unstaged, stop:

      "Uncommitted changes detected. Commit, stash, or dis

Alternatives in Git

  • Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • OSS PR — Commit + PR workflow for open source contributions: auto-creates a user-prefixed branch when on main/master, t 19.7k ★

Full documentation available on GitHub

View Source Repository