sync-latest-git

Synchronize a local Git feature branch with its remote origin.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Loot-Labs/claude-plugins --skill sync-latest-git
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-latest-git
Source: https://github.com/Loot-Labs/claude-plugins/tree/main/plugins/sync-latest-git/skills/sync-latest-git
Command: npx skills add https://github.com/Loot-Labs/claude-plugins --skill sync-latest-git

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Synchronizes a local feature branch with its remote origin by updating the primary branch from origin and optionally merging or rebasing into the feature branch.

Core Features & Use Cases

  • Detects the primary branch (main, master, or dev) and updates it from origin.
  • Updates the feature branch by either merging the primary into it or rebasing onto it, with guidance at decision points.
  • Shows new commits introduced by the update and enforces pre-merge checks for a clean working tree.

Quick Start

Update the current feature branch to the latest origin by syncing from the primary and, if desired, merging or rebasing into your feature branch.

Frequently Asked Questions about sync-latest-git

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

FAQPage Schema
How do I sync a local feature branch with the latest remote origin?

To sync a local feature branch with origin, the workflow fetches updates, detects the primary branch (main, master, or dev), updates it from origin, and then merges or rebases those changes into your feature branch.

What is the best way to update a feature branch with the latest primary branch commits?

Updating a feature branch involves pulling the latest commits from the primary branch and applying them via a merge or rebase strategy. This process enforces pre-merge checks to ensure a clean working tree before applying the update.

Does merging the primary branch into a feature branch require a clean working tree?

Yes, merging or rebasing from the primary branch requires a clean working tree. The workflow validates that there are no uncommitted changes before proceeding with the merge or rebase operation to prevent conflicts.

How do I choose between merging and rebasing when updating my feature branch?

When updating your feature branch, the workflow prompts you to choose between merging the primary branch into your feature branch or rebasing your feature branch onto it, guiding you through the decision point based on your Git workflow needs.

Can I force push a feature branch to origin after rebasing?

Yes, after rebasing a feature branch onto the primary branch, the workflow optionally supports force-pushing the updated commit history to the remote origin to synchronize the remote branch.

How does the workflow detect the primary branch for syncing my feature branch?

The workflow detects the primary branch by checking for the existence of main, master, or dev branches. It updates the detected primary branch from origin before merging or rebasing those changes into your local feature branch.