Git commit
One commit covering all current changes. Message grammar: Conventional Commits 1.0.0. Full header/body/footer rules → reference.md.
Steps
- Inspect with
git status,git diff, andgit diff --stagedif anything is staged. Infer intent and any obvious breaking API/behavior change. - Nothing to commit → say so and stop (no empty commit).
git add -A, then re-checkgit diff --stagedandgit status --shortso the message matches staged content only.- Choose one
typefor the dominant change (featfor a new feature,fixfor a bugfix, elsedocs/refactor/perf/test/build/ci/chore/styleas fits). - Write the message per reference.md. Prefer
git commit -m "header" -m "body and footers"so the blank line after the header is preserved. - Push only if this message explicitly asks.
- On success, paste the exact recorded message (
git log -1 --format=%B) into chat — full header/body/footers, not a summary. - Done when: one commit exists for the staged set, the chat shows that exact message, and you have not pushed unless asked — or you stopped with nothing to commit / awaiting split confirmation.
Split vs squash
Default is one commit. If the staged set clearly mixes unrelated work, warn and offer to split; split only on user confirm.