cat:git-merge-linear

Merge a task branch into its base with a linear fast-forward history.

101|2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cowwoc/cat --skill cat-git-merge-linear
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cat:git-merge-linear
Source: https://github.com/cowwoc/cat/tree/main/plugin/skills/git-merge-linear
Command: npx skills add https://github.com/cowwoc/cat --skill cat-git-merge-linear

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill merges a task branch into its base branch while preserving a linear history, enabling predictable integration from the task worktree.

Core Features & Use Cases

  • Maintain a clean, linear Git history by squashing commits when needed.
  • Perform a fast-forward merge directly to the base branch from the task worktree without checking out the base.
  • Includes safeguards against base divergence and unintended deletions during merge.

Quick Start

From the task worktree, confirm the base branch using the cat-base file, ensure there are no uncommitted changes, squash multiple commits into a single commit if needed, push the fast-forward to HEAD:<BASE_BRANCH>, and finally clean up by removing the temporary worktree and deleting the task branch.

Frequently Asked Questions about cat:git-merge-linear

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

FAQPage Schema
How do I merge a git task branch while keeping a linear history?

To merge a git task branch with a linear history, the skill performs a fast-forward push directly to the base branch from the task worktree without checking out the base, squashing commits if needed.

Can I fast-forward merge to a base branch without checking it out?

Yes, you can fast-forward merge to a base branch without checking it out by pushing directly to HEAD:<BASE_BRANCH> from the task worktree, ensuring a clean update without local base checkout.

What safeguards exist against base divergence during a git worktree merge?

Safeguards against base divergence during a git worktree merge include verifying the worktree is clean and enforcing a strict fast-forward push to prevent unintended deletions and integration conflicts.

When should I squash commits before integrating a task branch?

You should squash commits before integrating a task branch when multiple task commits need to be condensed into a single commit to maintain a clean, predictable, and linear history on the base branch.

What are the steps to clean up a temporary git worktree after merging?

To clean up a temporary git worktree after merging, you remove the temporary worktree directory and delete the task branch once the fast-forward push to the base branch is verified as successful.