fast-forward

Lands a finished feature branch onto the local trunk as a fast-forward with changelog-worthy commits.

Updated May 9, 2026
One-click install
npx skills add https://github.com/natelandau/cc-plugin --skill fast-forward-natelandau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fast-forward
Source: https://github.com/natelandau/cc-plugin/tree/main/plugins/natelandau-toolkit/skills/fast-forward
Command: npx skills add https://github.com/natelandau/cc-plugin --skill fast-forward-natelandau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merging a finished feature branch into main often leaves messy commit history, accidental merge commits, or forgotten worktrees and branches. This Skill lands a completed branch onto the local main or master as a clean fast-forward, with every commit rewritten to read as a public changelog entry, then removes the branch and its worktree. ## Core Features & Use Cases - Linear history landing: Syncs the local trunk, rebases the feature branch onto it, and merges with git merge --ff-only so no merge commit is ever created. - History regrouping: Rewrites the branch into a few reviewable conventional commits whose messages describe user-facing changes, verified byte-for-byte identical to the original tree. - Safe cleanup: Verifies the trunk tip matches the feature tip before deleting the branch and removing any linked worktree, and never pushes to the remote. - Use Case: You finished a feature in a git worktree and want it on main with a clean, release-note-ready history. Invoke the skill and it commits outstanding work, rebases, regroups the commits, fast-forwards main, and cleans up. ## Quick Start Merge my current feature branch into main as a fast-forward and clean up the branch and worktree.

Frequently Asked Questions about fast-forward

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

FAQPage Schema
How do I merge a feature branch into main without a merge commit?

Rebase the feature branch onto the local trunk, then run git merge --ff-only from the trunk checkout. This advances the trunk ref to the feature tip without writing a merge commit, keeping history linear.

How do I clean up a git worktree after merging its branch?

Remove the worktree first with git worktree remove <path>, then delete the branch with git branch -d. A branch checked out in a worktree cannot be deleted, and the safe -d delete doubles as a final merge check.

Why does git merge --ff-only refuse to fast-forward?

The trunk moved after the feature branch was rebased, so the feature is no longer a linear descendant. Rebase the feature onto the current trunk again and retry; never fall back to --no-ff if you want linear history.

Does this fast-forward workflow push to the remote?

No. The fast-forward lands only on the local trunk, and the workflow explicitly stops after cleanup so the user can review and push manually. It also stops if the local and remote trunks have diverged.

When should I use squash instead of a fast-forward merge?

Use squash when the branch's work should land as a single commit rather than a small set of changelog-worthy commits. A plain merge request defaults to fast-forward; only an explicit squash or single-commit request means the squash workflow.