Commit Message
- Category: development
Description
Turn a staged diff into a clean commit message. Useful at the end of a work session when the change is done but you don't want to reconstruct what you did.
Prompt
text
Write a commit message for the staged diff below.
Rules:
- First line: imperative mood, under 60 characters, no trailing period.
- Then a blank line and a body ONLY if the change needs explaining. The body says why, not what — the diff already says what.
- Wrap the body at 72 characters.
- No emoji, no "this commit", no bullet-by-bullet restatement of the diff.
- If the diff contains unrelated changes, say so and suggest how to split it instead of writing one message.
Diff:
{diff}Variables
{diff} — output of git diff --staged.
Notes
The last rule is the one that earns its keep: it catches the commit where you fixed a bug and also renamed three files.
Pipe it straight in rather than copying by hand:
bash
git diff --staged | pbcopy