worktree-sync

Fetch remote changes, update main, and rebase or merge Git worktrees.

18|5|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/HomericIntelligence/ProjectOdyssey --skill worktree-sync-homericintelligence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-sync
Source: https://github.com/HomericIntelligence/ProjectOdyssey/tree/main/.claude/skills/worktree-sync
Command: npx skills add https://github.com/HomericIntelligence/ProjectOdyssey --skill worktree-sync-homericintelligence

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps manage and synchronize multiple Git worktrees, ensuring they are up-to-date with the main branch and remote changes, thereby preventing merge conflicts and maintaining a clean commit history.

Core Features & Use Cases

  • Fetch Remote Changes: Updates your local repository with the latest commits from the remote.
  • Update Main Branch: Pulls the latest changes into your primary development branch.
  • Rebase Feature Branches: Integrates changes from the main branch into your feature branches using a rebase strategy for a linear history.
  • Merge Feature Branches: Alternatively, merges changes from the main branch into feature branches, preserving branch history.
  • Conflict Resolution Guidance: Provides steps to resolve merge conflicts when they arise.
  • Use Case: You're working on a long-running feature branch and need to incorporate the latest updates from main before submitting a pull request. This skill guides you through fetching, updating main, and rebasing your feature branch.

Quick Start

Use the worktree-sync skill to rebase the current feature branch onto the latest main branch.

Frequently Asked Questions about worktree-sync

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

FAQPage Schema
How do I keep my git worktree up-to-date with the main branch?

To sync a feature branch in a git worktree, fetch the latest remote changes, update your local main branch, and then rebase your feature branch onto main to ensure a linear commit history before submitting a pull request.

What is the best way to resolve divergence between a feature branch and main in a worktree?

The best way to resolve branch divergence is to fetch remote updates, pull them into the main branch, and then either rebase for a linear history or merge to preserve branch history, following provided conflict resolution guidance if needed.

Should I use git rebase or merge to sync feature branches in a collaborative environment?

Use git rebase to integrate main branch changes into feature branches for a linear history, or use git merge if you need to preserve the original branch history while synchronizing updates across your worktrees.

Do I need Git command-line operations to sync multiple worktrees?

Yes, syncing git worktrees requires Git command-line operations for fetching remote changes, pulling updates into the main branch, and executing rebase or merge commands to integrate changes into feature branches.

Why does my feature branch have merge conflicts after updating the main worktree?

Merge conflicts occur when syncing feature branches because the branch has diverged from the updated main branch, requiring you to manually resolve conflicting commits during the rebase or merge process.