sync-branch

Rebase the current Git branch onto main with stashing and optional force push.

2|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/dmzoneill/skills --skill sync-branch-dmzoneill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-branch
Source: https://github.com/dmzoneill/skills/tree/main/sync-branch
Command: npx skills add https://github.com/dmzoneill/skills --skill sync-branch-dmzoneill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of updating your current feature branch with the latest changes from the main branch, preventing merge conflicts and keeping your work synchronized.

Core Features & Use Cases

  • Rebase onto Main: Integrates the latest changes from the main branch into your current branch using git rebase.
  • Automatic Stashing: Safely stashes uncommitted changes before rebasing and reapplies them afterward.
  • Optional Force Push: Allows for a force push to your remote branch after a successful rebase.
  • Linting: Includes an option to run linters before a force push to ensure code quality.
  • Use Case: You've been working on a feature branch for a few days and want to incorporate the latest updates from main before creating a pull request.

Quick Start

Sync your current branch with the main branch, stashing and force-pushing any changes.

Frequently Asked Questions about sync-branch

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

FAQPage Schema
How do I rebase my current Git branch onto main?

To rebase your current Git branch onto main, this skill fetches upstream changes and rebases your work onto the target branch, automatically stashing and reapplying any uncommitted changes to ensure synchronization.

What is the best way to sync a feature branch with upstream changes?

The best way to sync a feature branch with upstream changes is using a rebase workflow, which replays your commits onto the latest main branch, preventing merge conflicts and keeping your development line synchronized.

Can I safely rebase a Git branch with uncommitted changes?

Yes, you can safely rebase a Git branch with uncommitted changes because the process automatically stashes your local modifications before executing the rebase and reapplies them afterward.

How do I force push a Git branch after rebasing?

To force push a Git branch after rebasing, this skill provides an optional force push feature, which can be configured to run linters first to ensure code quality before updating the remote branch.

Why should I use rebase instead of merge to update my feature branch?

You should use rebase instead of merge to update your feature branch because rebasing integrates upstream changes linearly, preventing intermediate merge commits and keeping your project history clean before a pull request.

Does the Git rebase workflow run linters before pushing to remote?

Yes, the Git rebase workflow includes an option to run linters before executing a force push to your remote branch, ensuring that code quality checks pass before synchronizing your updated feature branch.