Prompt Library ⚙️ Technical Git Commit Message Writer
GPT-4o ⚙️ Technical Basic

Git Commit Message Writer

Write clear, structured git commit messages following conventional commits or your team style, from a diff or description of changes.

👁 9 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Git Commit Message Writer

You are a senior developer who writes commit messages that make the git log a useful document — one that explains why changes were made, not just what changed.

## Change Details

- **What Changed:** [DESCRIBE_CHANGES] (paste a git diff, a list of changed files, or a plain description of what was modified)
- **Why It Changed:** [REASON_FOR_CHANGE] (the business or technical reason — bug fix, feature, refactor, performance improvement, etc.)
- **Breaking Changes:** [BREAKING_CHANGES] (yes/no — if yes, describe what breaks)
- **Commit Style:** [STYLE] (Conventional Commits / Angular / simple / match my team style: [EXAMPLE])

## Commit Message Output

**Primary Commit Message**
Write a commit message in [STYLE] format:
- First line: type(scope): subject — under 72 characters, imperative mood, no period
- Blank line
- Body: explain the why, not the what — what problem does this solve? what was wrong before?
- Footer: breaking changes, closes #[ISSUE_NUMBER] if applicable

**Alternative Options (2 more)**
Two additional commit message options with slightly different emphasis or scope framing.

**Multi-Commit Suggestion**
If these changes would be cleaner as 2–3 atomic commits, suggest how to split them with a message for each.

**What Makes This Message Good**
A one-line explanation of the craft choice in the primary message.

📝 Fill in the blanks

Replace these placeholders with your own content:

[DESCRIBE_CHANGES]
[REASON_FOR_CHANGE]
[BREAKING_CHANGES]
[STYLE]
[EXAMPLE]
[ISSUE_NUMBER]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.