Commit message generator: good git commit messages from your diff
"fix stuff" and "wip" don't help anyone six months later, including you. Paste your git diff and your todo.is agent writes a commit message that follows your team's style: a short imperative subject, a body that explains why the change was made, and a hint when the diff should really be two commits.
The prompt
- Write a git commit message for this diff: [GIT DIFF]. Context: [WHY I MADE THE CHANGE]. Follow [COMMIT STYLE]. Subject line under 50 characters, imperative mood ("Add", not "Added"), then a blank line and a body wrapped at 72 characters that explains why, not just what. Mention [ISSUE OR TICKET NUMBER] in a footer. If the diff mixes unrelated changes, suggest how to split it into separate commits with a message for each.
What to change
- [GIT DIFF]: Paste the output of git diff --staged, or attach it as a .txt or .patch file.
- [WHY I MADE THE CHANGE]: One or two sentences, e.g. "customers in Australia saw the wrong tax because the rate was cached per server".
- [COMMIT STYLE]: E.g. "Conventional Commits (feat:, fix:, chore:)", "Linux kernel style", "our team's: [area] Short summary".
- [ISSUE OR TICKET NUMBER]: E.g. "Closes #482", "JIRA SHOP-1193", or "none".
Example result
- Suggested commit
- fix(tax): stop caching tax rates across regions
- Tax rates were cached per server with the country as the only key, so
- the first region to hit a server set the rate for everyone. Australian
- customers on a server warmed by NZ traffic were charged 15% GST
- instead of 10%.
- Cache rates by country and state, and expire them after 1 hour so
- rate changes from the provider show up the same day.
- Closes #482
- Why it's written this way
- • fix(tax): a Conventional Commits type and scope, so changelog tools put it under Bug fixes
- • Subject (47 characters): imperative, no full stop, says what the commit does when applied
- • Body: explains the cause and the effect on users, which the diff can't show
- • Footer: "Closes #482" links and closes the issue on GitHub and GitLab
- Your diff also contains an unrelated change
- The diff renames formatPrice to formatMoney in 6 files. That's a refactor, not part of the fix. Split it with git add -p into two commits:
- 1. refactor: rename formatPrice to formatMoney
- No behaviour change. The new name matches the money module.
- 2. fix(tax): stop caching tax rates across regions (as above)
- Other options for the subject
- • fix(tax): key rate cache by country and state
- • fix(checkout): charge the right GST for Australia
How to do it with todo.is
- Run git diff --staged and copy the output (or save it to a file).
- Paste it into the prompt with a sentence on why you made the change and your commit style.
- Send it in todo.is or from Slack or Telegram to your agent.
- Copy the message into git commit, or use git commit -F message.txt.
- Ask for a shorter version or a different style if your team prefers one.
Tips for a better result
- The diff shows what changed; only you know why. One sentence of context makes the body useful.
- Keep the subject under about 50 characters so it isn't cut off in git log --oneline and on GitHub.
- One logical change per commit. Smaller commits are easier to review, revert and bisect.
- If your team uses Conventional Commits, say which types are allowed (feat, fix, docs, refactor, chore, test).
- Your agent remembers your commit style after the first time, so next time you can paste only the diff.
commit message generator: FAQ
- What is Conventional Commits? A convention where the subject starts with a type and optional scope, like feat(auth): or fix:, so tools can build changelogs and pick version numbers automatically. A ! or a BREAKING CHANGE footer marks breaking changes.
- How long should a commit message be? A subject of about 50 characters, a blank line, then a body wrapped at 72 characters. Small obvious changes can skip the body.
- Should I write commit messages in past or present tense? Most projects, including Git itself, use the imperative: "Add login rate limit", as if completing the sentence "If applied, this commit will…".
- Can it write pull request descriptions too? Yes. Paste the diff or the list of commits and ask for a PR description with a summary, testing notes and screenshots to add.
JavaScript is required to use the todo.is app.