wt-sync

Synchronize local Git worktrees with upstream changes using stash and merge or rebase.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/michael-menard/monorepo --skill wt-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wt-sync
Source: https://github.com/michael-menard/monorepo/tree/main/.claude/skills/wt-sync
Command: npx skills add https://github.com/michael-menard/monorepo --skill wt-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need to keep their Git worktrees aligned with the latest changes from an upstream remote while safely handling uncommitted changes.

Core Features & Use Cases

  • Automatic stash/restoration: Safely stash uncommitted changes before syncing and restore afterward.
  • Upstream synchronization: Fetches latest changes from the upstream remote and applies them to the current worktree.
  • Merge strategy choice: Supports rebase or merge strategies to align with team workflow.
  • Use Case: When multiple worktrees are used, or when updating a feature worktree to the latest upstream commits.

Quick Start

Use the slash command to sync your worktree with upstream changes: /wt-sync

Frequently Asked Questions about wt-sync

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

FAQPage Schema
How do I sync a git worktree with upstream changes without losing uncommitted work?

To sync a git worktree with upstream changes safely, the process automatically stashes uncommitted modifications, fetches the latest remote updates, and restores your stashed work afterward.

Can I choose between merge and rebase strategies when updating a git worktree?

Yes, you can select either a merge or rebase strategy to align your git worktree with the latest upstream commits, allowing you to match your specific team workflow requirements.

How does syncing upstream changes work when using multiple worktrees with different branches?

Syncing upstream changes across multiple worktrees works by fetching the latest remote updates and applying them to the specific branch currently checked out in each worktree.

What is the best way to fetch and apply upstream commits to a feature worktree?

The best way to fetch and apply upstream commits to a feature worktree is to use a dedicated sync command that retrieves remote changes, safely stashes local edits, and integrates the updates.

Does syncing a git worktree handle stashing and restoring local edits automatically?

Yes, syncing a git worktree handles stashing and restoring local edits automatically, ensuring your uncommitted changes are safely set aside before fetching and restored after syncing completes.