dev-update-working-branch

Fetch origin/main, fast-forward local main, and rebase the current branch onto main.

36|6|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Nebulavenus/forge-gpu --skill dev-update-working-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-update-working-branch
Source: https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/dev-update-working-branch
Command: npx skills add https://github.com/Nebulavenus/forge-gpu --skill dev-update-working-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Update the current working branch to align with the latest changes in main, reducing merge conflicts and ensuring tests run against the latest code.

Core Features & Use Cases

  • Fetches origin/main to obtain the latest main branch.
  • Updates local main to match origin/main.
  • Rebases the current branch onto main to maintain a clean linear history.
  • Safety checks: prevents running on main and warns about uncommitted changes.

Quick Start

Run the skill on your feature branch to fetch origin/main, fast-forward local main, and rebase your branch onto main.

Frequently Asked Questions about dev-update-working-branch

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

FAQPage Schema
How do I update my feature branch with the latest changes from main?

To update your feature branch, you need to fetch origin main, fast-forward your local main branch, and rebase your current working branch onto main. This maintains a clean, linear history and ensures tests run against the latest code.

When should I rebase my working branch onto main?

You should rebase your working branch onto main before pushing fixes during code reviews, before resolving feedback, or whenever your branch is behind main. This reduces merge conflicts by aligning your changes with the latest main branch updates.

What happens if I try to rebase while having uncommitted changes in git?

When you attempt to rebase with uncommitted changes, safety checks will trigger a warning. These checks prevent potentially losing work during the rebase process, ensuring your local modifications are safely handled before updating the branch.

Can I run a git rebase directly on the main branch?

No, you cannot run this rebase process directly on the main branch. Safety checks explicitly prevent running the update workflow on main, ensuring the operation only applies to feature branches to maintain a clean, linear history.

What is the best way to maintain a clean linear history in git before a code review?

The best way to maintain a clean linear history is to fetch origin main, update your local main to match it, and rebase your feature branch onto main. This applies the latest changes underneath your commits, reducing merge conflicts before pushing fixes.