How to use the Conventional Commit Message Generator
- 1. Pick the typefeat for a feature, fix for a bug, docs, refactor, test and so on.
- 2. Describe the changeAdd a scope, a short description, an optional body and issue numbers.
- 3. CopyCopy the message, or the full git commit command.
The format
A Conventional Commit looks like this:
type(scope)!: short description
optional body
optional footer(s)- type says what kind of change it is. feat and fix are the two that matter most to release tools.
- scope (optional) names the part of the code, such as auth, api or ui.
- ! after the type or scope marks a breaking change, and a
BREAKING CHANGE:footer explains it. - Footers like
Closes #42link the commit to issues on GitHub or GitLab, which closes them automatically when merged.
The tool also points out common slips: a first line over 72 characters, a full stop at the end, or "added" instead of the imperative "add".
Worked example
Type feat, scope auth, description add OTP login with WhatsApp, a two-line body and issue #42 give:
feat(auth): add OTP login with WhatsApp
Users can now sign in with a one-time code sent on WhatsApp.
The old SMS flow stays as a fallback.
Closes #42The first line is 39 characters, well under the 72-character limit. Because it is a feat, tools such as semantic-release would make this a minor version bump (1.4.2 → 1.5.0). A fix would be a patch, and anything marked breaking would be a major bump.
The git command uses one -m per paragraph, so the blank lines between the subject, body and footer are kept. Clear commit history is one of the first things reviewers notice on a fresher's GitHub profile.
Frequently asked questions
Do I have to use Conventional Commits?
No, but many open-source projects and companies require them, and they make changelogs and versioning automatic.
What is the difference between chore and build?
build is for the build system or dependencies (webpack, npm packages). chore is for other maintenance that doesn't change source or tests.
Can I check messages automatically?
Yes. commitlint with a Git hook (for example via husky) rejects messages that don't follow the format.
Is the conventional commit message generator free?
Yes, it is free. Building your first message asks for your name and WhatsApp number once. After that, the conventional commit message generator and every other Uncodemy tool open with no form.