Start here
ReferenceNormative
Git conventions
Commits carry the logged-in identity and nothing else — no co-author trailers, no tool attribution, and no push that was not asked for.
- Commits are attributed to the logged-in git user only — whatever
git config user.name/user.emailresolves to. Never override author or committer. - No co-author trailers. Never append
Co-Authored-By:lines of any kind. - No tool attribution. No "Generated with…" footers, no 🤖 emoji lines.
- Imperative commit messages — "Add feature", not "Added feature".
- Cite the requirement identifier in the commit message where one exists. That citation is what makes a rule traceable to the line of code that serves it. See identifiers.
- Never push unless asked. A previous instruction to commit and push does not carry to the next change. Commit when asked, push when asked, each time.
Never run git reset --hard or git stash.
More than one identity on a machine
Where a machine carries several git identities, the switch is per repository and
local to .git/config — never a global setting, because a global one silently
attributes the next repository you touch.
Check git config user.email before the first commit in an unfamiliar
repository. Never commit, push, or write anything that links one identity to
another.