git-master

Performs atomic Git commits, history rewrites, and evidence-based history investigation.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/hugefiver/ocmm --skill git-master-hugefiver
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-master
Source: https://github.com/hugefiver/ocmm/tree/main/plugins/deepwork/skills/git-master
Command: npx skills add https://github.com/hugefiver/ocmm --skill git-master-hugefiver

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Git operations like committing, rebasing, and history investigation are error-prone: unrelated changes get bundled into commits, force-pushes destroy shared history, and archaeology questions get answered from guesswork instead of evidence. This Skill enforces a conservative, evidence-led workflow for every Git operation. ## Core Features & Use Cases - Atomic Commit Grouping: Detects the repository's commit-message style, splits unrelated changes by behavior and module, stages by path or hunk, and verifies each staged group before committing. - Safe History Rewriting: Handles rebase, squash, fixup/autosquash, and conflict resolution with explicit safety checks, --force-with-lease instead of plain force-push, and rebase --abort/reflog recovery paths. - History Investigation: Answers who/when/why questions using git log -S/-G, blame, bisect, reflog, and --follow, always citing exact commit hashes and command evidence. - Use Case: You have a dirty working tree with three unrelated changes and need them committed cleanly. The Skill inspects the full diff, groups changes into atomic commits matching the repo's message style, preserves unrelated work, and reports each commit hash. ## Quick Start Use the git-master skill to split my current uncommitted changes into atomic commits following this repository's commit message style.

Frequently Asked Questions about git-master

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

FAQPage Schema
How do I split uncommitted changes into atomic commits?▼

Inspect the full diff, group changes by behavior and module, then stage each group by path or hunk and commit separately. Verify each group with git diff --staged --stat before committing, and keep implementation with its direct tests together.

How to find who changed a specific line in Git?▼

Use git blame -L start,end -- file to see who last changed specific lines, and git log --follow -- file to trace history across renames. For when a string appeared or disappeared, use git log -S for exact strings or git log -G for regex patterns.

Is it safe to rebase a branch that was already pushed?▼

Rebasing pushed branches rewrites shared history, so ask before force-pushing and always use --force-with-lease instead of plain --force. Never rewrite main, master, or release branches unless the user explicitly requested that exact operation.

What should I do when a git rebase goes wrong?▼

Run git rebase --abort first to return to the pre-rebase state. Use git reflog only after explaining the recovery path, since reflog can locate the previous HEAD but should not be the first recovery attempt.

When should I not use this Git workflow skill?▼

Do not use it for ordinary code edits that involve no Git operations; it is intended for commits, history rewrites, and history investigation. It also refuses to commit, push, or delete anything unless the user explicitly asked for that operation.