git-rebase-sync

Rebase local feature branches onto the latest origin base with conflict handling.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill git-rebase-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-rebase-sync
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/git-rebase-sync
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill git-rebase-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the risk and tedium of synchronizing a local feature branch onto the most recent remote base branch by guiding a careful, confirmable rebase process and deliberate conflict resolution instead of blind merges or force pushes.

Core Features & Use Cases

  • Safe backups: create a local annotated tag as a pre-rebase recovery point.
  • Controlled rebase: fetch origin, determine base, and run interactive rebase with an option to preserve merge commits.
  • Deliberate conflict resolution: inspect conflicts, ask targeted questions when intent is ambiguous, stage resolved files, and continue the rebase loop.
  • Safe push: require explicit confirmation and prefer git push --force-with-lease when updating remote history.
  • Use Case: update a long-running feature branch onto the repository default branch before opening or updating a pull request, ensuring tests and linters run after rebase.

Quick Start

Rebase the current branch onto the repository default base, create a local annotated backup tag first, and ask me to confirm the exact rebase and push commands before executing them.

Frequently Asked Questions about git-rebase-sync

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

FAQPage Schema
How do I safely rebase a local feature branch onto the latest origin base?

Safely rebase a local feature branch by first creating a local annotated backup tag, then fetching the origin base branch and running a deliberate interactive rebase with conflict resolution prompts before pushing. This process requires explicit confirmation before executing any history-rewriting commands to prevent accidental data loss.

What is the best way to resolve merge conflicts during a git rebase?

Resolving merge conflicts during a git rebase involves inspecting the conflicting files, staging the resolved changes, and continuing the rebase loop. This deliberate conflict handling approach asks targeted questions when intent is ambiguous to ensure accurate code integration before proceeding.

Can I preserve merge commits when rebasing a long-running feature branch?

Yes, you can preserve merge commits when rebasing a feature branch by utilizing the interactive rebase option designed to maintain them. This allows you to update your branch onto the repository default base while keeping your commit history structure intact.

Why should I use force-with-lease instead of a standard force push after rebasing?

Using force-with-lease instead of a standard force push after rebasing ensures you only update the remote history if no concurrent changes have occurred. This safe push mechanism requires explicit confirmation and prevents accidentally overwriting commits pushed by collaborators.

How do I backup my local git branch before rewriting history?

Backup your local git branch before rewriting history by creating a local annotated tag as a pre-rebase recovery point. This safety measure ensures you can easily restore your previous branch state if the rebase or conflict resolution process produces unexpected results.

Does this rebase process work for updating branches before opening a pull request?

Yes, this rebase process is designed for updating long-running feature branches onto the repository default branch before opening or updating a pull request. It synchronizes your code with the latest base and ensures tests and linters run successfully after the rebase completes.