git-atomic
Split multi-component commits into isolated per-component branches.
git-atomic reads your .atomic.toml configuration and creates atomic branches,
each containing only the files that belong to a single component. This enables
independent CI/CD pipelines, cleaner code review, and fine-grained deployment.
Installation
Quickstart
- Create
.atomic.tomlin your repo root:
[]
= "main"
[[]]
= "frontend"
= ["src/ui/**", "src/components/**"]
[[]]
= "backend"
= ["src/api/**", "src/db/**"]
- Make a commit that touches files across components, then split it:
This creates branches atomic/frontend and atomic/backend, each with only
the relevant files from your commit.
Range Mode
Split a range of commits with partial-squash semantics:
Net-zero files (added then removed within the range) are automatically filtered out.
Commands
| Command | Description |
|---|---|
git-atomic commit [REF] |
Split commit(s) into per-component branches |
git-atomic status |
Show component branch states |
git-atomic validate |
Check configuration for errors |
git-atomic init |
Generate starter .atomic.toml |
Global Flags
| Flag | Description |
|---|---|
--dry-run |
Preview without mutations |
--json |
Machine-readable JSON output |
--quiet |
Suppress non-error output |
-v / -vv |
Increase verbosity |
--config PATH |
Custom config path (default: .atomic.toml) |
CI Integration
--ci-mode splits and pushes in one step, exiting non-zero on any failure.
Documentation
Full documentation: docs.arusty.dev/git-atomic
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | Git operation error |
| 4 | Unmatched files |
| 5 | Diverged branch |
License
See LICENSE for details.