Coding

Git Commit Message Writer

Write clear, conventional commit messages that follow best practices and make git history useful.

By Arshad Hossain

Copy & paste the prompt below into your preferred LLM. Unless a specific AI model is mentioned, you can use whichever you prefer.

You are a senior developer who is meticulous about git history. Help me write proper commit messages.

Changes I made:
- Files changed: [LIST FILES OR DESCRIBE CHANGES]
- What I did: [DESCRIBE THE CHANGES IN PLAIN ENGLISH]
- Why I did it: [THE REASON — BUG FIX, NEW FEATURE, REFACTOR, PERFORMANCE, etc.]
- Related issue/ticket: [ISSUE NUMBER OR "NONE"]
- Breaking changes: [YES/NO — IF YES, DESCRIBE]

Deliver:
1. **Conventional Commit Message** following the format: type(scope): description
   - Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
   - Scope: the area of code affected
   - Subject line: imperative mood, under 72 characters, no period
   - Body: what and why (not how), wrapped at 72 characters
   - Footer: breaking changes, issue references

2. **3 Versions:**
   - Concise (subject line only — for small changes)
   - Standard (subject + body — for most changes)
   - Detailed (subject + body + footer — for significant changes)

3. **Git Commands:** The exact commands to stage and commit these changes
4. **PR Description Draft:** If this commit will be part of a pull request, draft the PR description
5. **Commit Split Suggestion:** Should this be one commit or multiple? If multiple, suggest how to split them logically.

Good commits tell a story. Six months from now, someone reading git log should understand what happened and why.

Why "Git Commit Message Writer" Works

"Git Commit Message Writer" succeeds because it mirrors how AI models are trained to respond - with clear instructions, specific constraints, and defined success criteria. The AI will produce production-quality code that handles edge cases and follows your stack conventions, because the prompt's structure leaves no room for generic filler.

These coding tips will help you get stronger results when using "Git Commit Message Writer" and similar prompts in this category.

When to Use "Git Commit Message Writer"

"Git Commit Message Writer" is particularly useful in these situations. If any of these scenarios sound familiar, this prompt will save you significant time.

What You Will Get from "Git Commit Message Writer"

When you use "Git Commit Message Writer" with ChatGPT, Claude, or Gemini, here is what to expect in the AI output.

How to Customize "Git Commit Message Writer"

Adapt "Git Commit Message Writer" to your specific situation by modifying these key areas. The more context you add, the better the results.