Skip to content

Instantly share code, notes, and snippets.

@razbakov
Created March 6, 2026 16:31
Show Gist options
  • Select an option

  • Save razbakov/f29a8a12c732cff3f1c8346aa7f11c0c to your computer and use it in GitHub Desktop.

Select an option

Save razbakov/f29a8a12c732cff3f1c8346aa7f11c0c to your computer and use it in GitHub Desktop.
Commit Message Rules

commit.txt Format

When changing code, update commit.txt in the repo root with the commit message. Do NOT run git commands to stage or commit — the user handles that manually.

  • Use Conventional Commits format directly (not markdown, not a description of changes).
  • First line: PROJ-123: <type>(<optional scope>): <short summary> (max 72 chars), PROJ-123 is a jira issue number (only if known, otherwise skip)
  • Blank line, then optional body explaining why (wrap at ~80 chars).
  • The file is gitignored.
  • If commit.txt already exists, the user has not committed yet — read it first, then merge/summarize the new changes together with the existing message so the file always covers all uncommitted changes since the last git commit.
  • If commit.txt does not exist, create it fresh.

Commit Message Rules

  • Types: feat, fix, refactor, chore, docs, perf, test
  • Use imperative mood: "add", "fix", "remove".
  • Do not mention specific filenames.
  • commit.txt must describe all current changes since the last git commit.
  • Every commit must reference an issue
  • Body is optional but when present:
    • Explain why, not what.
    • Wrap lines at ~80 chars.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment