git-worktree-sync

Synchronize git worktrees by rebasing and merging changes into the main branch.

5|3|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/ZHLX2005/fr --skill git-worktree-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-sync
Source: https://github.com/ZHLX2005/fr/tree/main/.claude/skills/git-worktree-sync
Command: npx skills add https://github.com/ZHLX2005/fr --skill git-worktree-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Synchronize all git worktrees so teams can safely merge per-branch changes into the main branch, then propagate updates to other worktrees, while automatically handling rebases and documenting conflicts.

Core Features & Use Cases

  • Automates worktree state collection and main-branch detection (main/master/develop)
  • Performs prioritized rebases, conflict resolution, and compile-time validation across all worktrees
  • Generates a detailed conflict-resolution log and a post-sync report for audit

Quick Start

Trigger a sync by invoking the skill in your local repository to begin rebasing and merging all worktrees into the main branch.

Frequently Asked Questions about git-worktree-sync

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

FAQPage Schema
How do I sync all git worktrees with the main branch automatically?

To sync git worktrees automatically, the skill collects worktree states, detects the main branch naming convention, and performs prioritized rebases to merge changes safely into the main branch.

What happens when git worktree rebasing encounters merge conflicts?

When rebasing git worktrees encounters merge conflicts, the skill handles conflict resolution automatically when possible and logs detailed conflict resolution steps to a generated document for audit.

Can I run a build verification across all git worktrees after merging?

Yes, you can run build verification across all git worktrees because the skill performs compile-time validation immediately after applying prioritized rebases and merging changes into the main branch.

Does git worktree synchronization require remote repository operations?

Git worktree synchronization does not require remote operations; it functions entirely locally by collecting worktree states, detecting main branch naming conventions, and applying rebases without remote network calls.

How does automated worktree sync handle different main branch naming conventions?

Automated worktree sync detects main branch naming conventions by checking for standard branch names like main, master, or develop before applying rebases and propagating updates to other worktrees.

What is the best way to document conflict resolution when rebasing multiple git worktrees?

The best way to document conflict resolution when rebasing multiple git worktrees is to generate a detailed conflict-resolution log and a post-sync report, which the skill produces automatically for audit purposes.