git-master

Inspect and manage Git history for commits, rebases, and repository state.

5|Updated May 17, 2026
One-click install
npx skills add https://github.com/islee23520/lfg --skill git-master-islee23520
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-master
Source: https://github.com/islee23520/lfg/tree/main/skills/git-master
Command: npx skills add https://github.com/islee23520/lfg --skill git-master-islee23520

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you make precise Git changes and answer history questions without disturbing unrelated work, so you can commit, rewrite, and investigate with confidence.

Core Features & Use Cases

  • Atomic commits: Stage only the intended changes and keep each commit focused on one behavior.
  • History investigation: Find who changed a line, when a feature appeared, or which commit introduced a bug.
  • Branch surgery: Rebase, squash, fix up, and autosquash commits while preserving a safe recovery path.
  • Use Case: A developer needs to clean up a messy worktree, create a single well-scoped commit, and identify the origin of a regression before pushing.

Quick Start

Ask the skill to inspect the current Git state and perform the requested commit, rebase, or history investigation while preserving unrelated changes.

Frequently Asked Questions about git-master

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

FAQPage Schema
How do I safely rebase and squash commits without losing unrelated work?

To safely rebase and squash commits, inspect the current Git status and diffs first to preserve unrelated changes. This approach uses reflog to maintain a safe recovery path, ensuring branch rewriting only targets intended commits while following repository-specific commit styles.

What is the best way to find which commit introduced a bug in my Git history?

Finding the commit that introduced a bug requires an evidence-led history investigation using Git bisect. This process inspects logs and diffs to pinpoint the exact regression commit, allowing you to identify when the defective feature appeared without disturbing your current worktree.

How do I create atomic commits when my Git worktree has mixed changes?

Creating atomic commits from a mixed worktree involves staging only the intended changes to keep each commit focused on one behavior. By inspecting diffs before committing, you ensure precise staging that separates unrelated modifications into their own focused commits.

Can I use Git blame to find who changed a specific line and when a feature appeared?

Git blame is used to find who changed a specific line and when a feature appeared in the codebase. This history investigation technique inspects commit logs and upstream context to trace the origin of modifications, providing clear evidence of when specific changes were introduced.

Does this Git history management approach work without additional dependencies?

This Git history management approach works without any additional dependencies. It operates independently to inspect repository state, manage reflog, and perform branch surgery, requiring only standard Git commands to analyze diffs, logs, and staging areas safely.

Why does Git reflog matter when rewriting branch history?

Git reflog matters when rewriting branch history because it provides a safe recovery path for your commits. By inspecting the reflog alongside status and logs before rebasing or squashing, you ensure that previous repository states remain accessible if the rewrite needs to be undone.