sync

Fetch upstream changes and rebase the current Git branch onto them.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/kirvin/copilot-cli-essentials --skill sync-kirvin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync
Source: https://github.com/kirvin/copilot-cli-essentials/tree/main/plugins/cpe/skills/sync
Command: npx skills add https://github.com/kirvin/copilot-cli-essentials --skill sync-kirvin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of synchronizing your local branches or forks with their remote counterparts, ensuring your code is current and conflicts are managed efficiently.

Core Features & Use Cases

  • Fetch and Rebase: Automatically fetches the latest changes from upstream and rebases your current branch onto them.
  • Conflict Resolution Guidance: Provides clear instructions on how to resolve merge conflicts when they arise.
  • Stash Management: Safely stashes local changes before syncing and restores them afterward, preventing data loss.
  • Use Case: Before starting new work on a feature branch, use this Skill to ensure it's based on the latest main branch, avoiding complex merge conflicts later.

Quick Start

Use the sync skill to rebase the current branch onto upstream main.

Frequently Asked Questions about sync

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

FAQPage Schema
How do I sync a local Git branch with upstream and rebase changes?

To sync a local Git branch with upstream, you fetch the latest remote changes and rebase your current branch onto them. This ensures your local commits are applied on top of the newest upstream code, keeping your project current without complex merges.

What is the best way to update a fork with the main project repository?

Updating a fork with the main project repository involves fetching changes from the upstream remote and rebasing your local feature branch onto the main branch. This aligns your fork with the latest project updates efficiently.

Can I safely stash local changes before rebasing onto upstream main?

Yes, you can safely stash local changes before rebasing onto upstream main. The synchronization process automatically stashes uncommitted work to maintain a clean directory, preventing data loss, and restores the changes once the rebase is complete.

How does conflict resolution guidance work during a Git rebase?

Conflict resolution guidance during a Git rebase provides clear instructions on how to handle merge conflicts when they arise. It helps developers identify and resolve overlapping code changes manually before continuing the branch synchronization.

Why should I sync a feature branch before starting new work?

You should sync a feature branch before starting new work to ensure it is based on the latest main branch. This avoids complex merge conflicts later by integrating upstream changes early and maintaining a clean, up-to-date working directory.