ameyalambat128 avatar

commit-chunks

Review and commit git changes in meaningful, atomic chunks. Use when a user asks to review uncommitt

作者 ameyalambat128|オープンソース

Commit Chunks

Overview

Create clean, atomic git commits by reviewing uncommitted changes, grouping related edits, and committing with conventional messages that explain intent.

Workflow

1) Inspect current changes

  • Run git status and git diff to inventory changes.
  • If the user asked for a review, read each changed file and identify risks, regressions, and test gaps.

2) Group changes into commits

  • Split by feature, file type, or purpose; keep each commit atomic.
  • Do not mix unrelated changes. If unsure how to group, ask a brief clarification.

3) Stage and commit per group

  • Stage only the relevant files for the group using git add <files>.
  • Commit with a conventional message:
    • Format: <type>(<scope>): <description>
    • Use feat, fix, chore, docs, refactor, style, or test.
    • Write descriptions that explain why, not just what.
  • Repeat for each group.

4) Wrap up

  • Show git log --oneline -10 after the last commit.
  • Summarize what was committed and any remaining uncommitted changes.