docs: add commit message quality rules to git instructions
- read diff before writing, only include what's in the diff - no CHANGES: headers, no speculative outcome sections - bullet points state what changed, not why or how
This commit is contained in:
parent
213265098f
commit
5c6b3b9636
@ -56,3 +56,23 @@ Format:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Types: `feat`, `fix`, `docs`, `refactor`, `chore`
|
Types: `feat`, `fix`, `docs`, `refactor`, `chore`
|
||||||
|
|
||||||
|
### Commit message rules
|
||||||
|
|
||||||
|
**Only include what actually changed in this commit.**
|
||||||
|
|
||||||
|
- Run `git diff --staged` (or `git diff` if nothing staged) and read it fully before writing
|
||||||
|
- List only files and lines that appear in the diff
|
||||||
|
- If a file appears in the diff but only has whitespace or comment changes, omit it from the body
|
||||||
|
- Never mention changes that are not in the diff — even if you remember discussing them earlier in the session
|
||||||
|
- If unsure whether something changed, check the diff — do not guess
|
||||||
|
|
||||||
|
**Format rules:**
|
||||||
|
- Subject line: max ~72 chars, imperative mood ("Fix", "Add", "Remove" — not "Fixed", "Added")
|
||||||
|
- Body: optional, only when the *why* is not obvious from the diff
|
||||||
|
- No bullet-pointed list of every file changed unless the diff spans many unrelated files
|
||||||
|
- No "CHANGES:" headers, no file-by-file breakdowns for single-topic commits
|
||||||
|
- No "Expected:", "Result:", "Impact:" or any speculative outcome sections — commit messages describe what changed, not what is predicted to happen
|
||||||
|
- Bullet points state *what* changed, not *why it was wrong* or *how it works* — keep each line short and factual
|
||||||
|
- ✅ `use MC_HOST_minio for S3 auth`
|
||||||
|
- ❌ `Use MC_HOST_minio env var for direct S3 auth (no mc alias set)`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user