Source: https://fnflow.app/dictate-git-commit-messages

# Writing git commit messages by voice
Commit messages are short, but the useful part is the why, and that's the part people skip when they type. Saying it out loud takes a few seconds. Dictating straight into a shell has a couple of traps, though, and Conventional Commits prefixes don't come out of a speech model the way you want. Here's how to dictate commit messages that read well in git log a year from now.

## The shape git expects

Git's own documentation suggests a single short line, no more than 50 characters, then a blank line, then a fuller description. Git treats everything up to the first blank line as the commit title and uses it throughout, in git log --oneline, in rebase lists and in many tools built on top.

That maps well onto speech. Say the title as one short sentence, pause, then explain the reason in a few more. The body is where dictation earns its keep: what was broken, why this fix, what you ruled out.

## Option 1: -m, once or twice

Git accepts several -m options and joins them as separate paragraphs, so the first is the title and the second the body:

git commit -m "Compare token expiry in seconds" \
-m "The middleware compared seconds with milliseconds, so sessions ended early. Cookie format is unchanged."
Put the cursor between the quotes, hold the dictation key and talk. It works, but a shell command line is a fussy place for prose:

- Inside double quotes, $ and backticks still expand. A sentence that mentions $HOME won't come out as written.
- In an interactive shell, an exclamation mark inside double quotes can trigger history expansion.
- Single quotes avoid both, but an apostrophe in "don't" ends the string.

If a dictated sentence has any of those, switch to the editor.

## Option 2: the editor, with the diff in view

Run git commit without -m and git opens an editor. It picks one from GIT_EDITOR, then core.editor, then VISUAL, then EDITOR. A GUI editor needs its "wait until the file is closed" flag, which you'll find in that editor's docs.

git config --global core.editor "<your editor command>"
git config --global commit.verbose true
commit.verbose (or git commit -v) shows the diff at the bottom of the message file. It isn't saved into the commit, but it gives you something to look at while you speak, which helps more than you'd expect. Teams that want a fixed structure can add a template with commit.template. Git starts the editor with that text, and aborts if you close it without editing.

## Conventional Commits by voice

The Conventional Commits spec uses the form <type>[optional scope]: <description>, then an optional body and footers, each after a blank line. fix patches a bug and feat adds a feature. A footer starting BREAKING CHANGE:, or a ! after the type, marks a breaking change. The spec also mentions build, chore, ci, docs, style, refactor, perf and test, from the commitlint conventional config.

Speech models don't produce that syntax reliably, and saying "feat open paren auth close paren colon" is slower than typing it. So split it:

- Type the prefix: fix(auth):
- Dictate the description in lower case words, short enough to stay near 50 characters with the prefix.
- Press Return twice and dictate the body.
- If it's breaking, type BREAKING CHANGE: yourself. The spec requires it in upper case.

The spec says any casing works for the rest as long as you're consistent. Dictation capitalizes the first word of a sentence, so check that against your team's habit.

## Read the title, then commit

A wrong word in a commit title lives forever, or at least until someone rewrites history. Look hardest at function names and numbers, the parts speech models hear by ear. If the same identifier keeps coming out wrong, add it to your dictation tool's vocabulary.

## With FnFlow

FnFlow pastes into the terminal, an editor buffer or a Git GUI's message box the same way: hold fn, talk, let go, and the text goes in with one ⌘V. It doesn't press Return, so nothing is committed until you do it. There's no AI pass, so the message says what you said, and if a paste goes missing, the dictation is in history with its audio. FnFlow won't type the prefix for you or wrap lines at 72 columns. Those stay on the keyboard or in your editor's settings.

Related: [dictation in the terminal](dictation-claude-code-terminal), [dictation in VS Code](vs-code-dictation-mac) if that's your git editor, and [custom vocabulary](whisper-custom-vocabulary) for project names.

## Questions

**Should I dictate into git commit -m or the editor?**
For a one-line message, -m is fine. For anything with a body, the editor is safer: no shell quoting, a blank line where git expects it, and with -v you can see the diff while you talk.

**How do I add a body with -m?**
Pass -m twice. Git's docs say multiple -m values are concatenated as separate paragraphs, so the first becomes the title and the second the body.

**Can I say the Conventional Commits prefix?**
You can, but it often comes out as words, like "fix colon". It's quicker to type feat( or fix: yourself and dictate the description after it.

**Why not let an AI write the commit message?**
That's an option. JetBrains AI Assistant, for example, generates commit messages. A generated message describes what changed, which the diff already shows. Dictating is a quick way to add why you changed it, which only you know.
