glossaryA commit that encapsulates exactly one logical change, making it independently understandable, revertable, and reviewable without affecting unrelated parts of the codebase.
An atomic commit follows the single-responsibility principle applied to version control. Each commit should represent one complete, coherent idea: adding a feature, fixing a bug, or updating a dependency. A commit is atomic when reverting it with git revert does not break unrelated functionality and when reading its diff in isolation tells a complete story. Atomic commits improve code review quality because reviewers can evaluate each change in isolation. They make bisecting regressions faster because git bisect can pinpoint a single commit as the source of a bug. They also enable cleaner cherry-picking when backporting fixes to release branches. Common violations include "big-bang" commits that mix feature additions, refactors, and bug fixes, and "WIP" commits that checkpoint work in progress without logical boundaries. Tools like git add -p help manually create atomic commits from a large working tree; git-agent automates this process.
feat(auth): add JWT verification middlewarefix(db): close connection pool on process SIGTERMrefactor(logger): extract formatLogLine into separate moduletest(cart): add unit tests for discount calculation edge caseschore(deps): pin lodash to 4.17.21 to resolve CVE-2021-23337git-agent's core feature is atomic commit splitting. When you stage multiple unrelated changes, git-agent analyses the diff, plans logically separate commit groups, then stages and commits each group independently — without any manual git add -p sessions.
brew install gitagenthq/tap/git-agentHow small should an atomic commit be?Is it bad practice to have a large number of commits in a pull request?Can I create atomic commits after the fact using git rebase?