use case

Make every PR reviewable with focused, well-described atomic commits

Code review quality depends on how easy it is to understand each change. git-agent splits your work into focused atomic commits with clear descriptions, so reviewers can evaluate each logical change independently — without context-switching between unrelated modifications in the same diff.

A PR containing multiple unrelated changes in one commit forces reviewers to mentally untangle what belongs together. It is harder to approve individual changes, harder to reject specific parts, and harder to understand the reasoning behind each change. Reviewers end up re-reading the same diff multiple times, and bugs slip through because the cognitive load is too high.

git-agent splits the working-tree changes into atomic commits before writing any commit. Each commit addresses one logical concern with a descriptive conventional message explaining what changed and why. Reviewers see a clean, focused commit history where each entry is independently reviewable, reversible, and cherry-pickable.

  • Work on your branch normally, run the relevant checks, and keep the completed changes in the working tree.
  • Run `git-agent --intent "..."`. The tool analyses the diff and plans atomic commit groups before executing the Git operations itself.
  • Review the plan and confirm. git-agent stages each group, generates a conventional message, commits it, and moves to the next group.
  • Push your branch. The PR shows a clean commit-by-commit history. Each commit has a focused diff and a message that explains the change, making review faster and more thorough.
Should I squash my atomic commits before merging the PR?
Not necessarily. Atomic commits with good messages are valuable to preserve in the main branch. If your team prefers a clean main branch, use a squash merge — but the atomic commits still improve review quality during the PR phase.
How does git-agent handle partial file changes during review?
git-agent can split individual hunks within a file into different commits. This means a single file with two unrelated changes (e.g., a bug fix and a refactor) can be split into separate commits, each with its own focused diff for review.
Does git-agent work with GitHub PR review workflows?
Yes. GitHub's PR interface shows each commit with its diff, exactly as git-agent creates them. Reviewers can comment on individual commits using GitHub's standard commit-by-commit review feature.