git-commit

Split git diffs into atomic per-file commits with user confirmation.

1|Updated Mar 27, 2022
One-click install
npx skills add https://github.com/huGgW/dotfiles --skill git-commit-huggw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/huGgW/dotfiles/tree/main/agent_rules/skill/git-commit
Command: npx skills add https://github.com/huGgW/dotfiles --skill git-commit-huggw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git commit splitting and creation guidelines help users transform changes into atomic, file-scoped commits, preserving a clear history.

Core Features & Use Cases

  • Goal: Accurately identify and understand all changes presented by the user (based on git diff) to plan commits on a per-file basis.
  • AI's Tasks:
  • Analyze the diff output provided by the user.
  • Ensure no file is included in more than one commit; handle multi-file changes by splitting per file as needed.
  • If diffs span closely related files, prompt the user to decide whether to bundle or separate commits.

Quick Start

Provide the diff of changes you want split and confirm per-file grouping rules.

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I split a multi-file git diff into atomic commits?

To split a multi-file git diff into atomic commits, provide the diff output for analysis. The tool plans commits on a per-file basis, ensuring no file appears in more than one commit to preserve a clean history.

What are atomic commits in version control and when do I need them?

Atomic commits in version control are file-scoped changes that isolate individual features or fixes. You need them when reviewing diffs that span multiple files, helping to produce clean, well-scoped histories for easier code review.

Can I bundle closely related files into a single git commit?

Yes, you can bundle closely related files into a single git commit. When diffs span related files, the tool prompts you to decide whether to bundle them together or separate them into distinct commits based on your grouping rules.

What's the best way to plan git commits for a large code review?

The best way to plan git commits for a large code review is to analyze the diff output per file. This approach assigns each file to a separate commit, requiring explicit commit planning and user confirmation before execution.

Do I need to provide per-file granularity in diffs to use this commit planner?

Yes, you need to provide per-file granularity in diffs to use this commit planner. The tool requires explicit diff output to accurately analyze changes, plan file-scoped commits, and prompt for user confirmation before execution.