Ferramentas Guias
Developer Gratuito Sem cadastro

Git Commit Message Generator

Generate conventional commit messages following the Conventional Commits spec with type, scope, emoji prefix, breaking change flags, and issue references.

Carregando ferramenta…

Sobre esta ferramenta

Craft perfectly formatted commit messages following the Conventional Commits specification without memorizing the syntax. Choose the commit type from the full list — feat, fix, docs, style, refactor, test, chore, perf, ci, build — each color-coded and explained. Add an optional scope to clarify which part of the codebase is affected and get smart scope suggestions based on the selected type. The tool suggests common scopes for each type: api, ui, db for feat; auth, parser, config for fix; readme, changelog for docs; and so on. Toggle the emoji prefix option to prepend a matching emoji (✨ feat, 🐛 fix, 📚 docs, 💄 style, ♻️ refactor, ✅ test, 🔧 chore, ⚡ perf, 👷 ci, 🏗️ build). Mark the commit as a breaking change to auto-insert the BREAKING CHANGE footer. Add issue references that auto-format as 'Closes #123'. The live preview updates with every keystroke showing exactly how the final commit message will look. A built-in diff analyzer lets you paste a git diff and suggests an appropriate commit type and scope. The Conventional Commits spec summary is always visible as a quick reference.

Como usar

  1. 1 Select the commit type that best describes your change (feat for new features, fix for bug fixes, etc.).
  2. 2 Optionally select or type a scope to indicate the affected area of the codebase.
  3. 3 Enter a concise description in the imperative mood (e.g. 'add login button', not 'added login button').
  4. 4 Toggle emoji prefix, breaking change, and issue reference options as needed.
  5. 5 The live preview at the top shows the final commit message — click Copy to copy it to the clipboard.
  6. 6 To generate from a diff, paste your git diff into the Analyze Diff tab and click Suggest.

What the Conventional Commits format encodes

A Conventional Commit is a plain git message that follows one strict shape so that both humans and tooling can parse it. This generator assembles that shape for you: <type>(scope)!: description, optionally followed by a body and footers. The first line — the subject — is the part everything else keys off. The structured prefix turns a free-form sentence into machine-readable metadata: release tools can read it to bump version numbers automatically, and changelog generators can group commits by type without a human sorting them.

The tool offers the ten standard types, each with a one-line meaning so you never have to guess which to pick:

TypeUse it forEmoji
featA new feature
fixA bug fix🐛
docsDocumentation-only changes📚
styleFormatting, whitespace, semicolons💄
refactorCode change that is neither a fix nor a feature♻️
testAdding or updating tests
choreTooling and maintenance🔧
perfPerformance improvements
ciCI configuration changes👷
buildBuild system or dependency changes🏗️

How type maps to Semantic Versioning

The format is not cosmetic — it drives version numbers. Under SemVer, feat warrants a MINOR bump (a new backward-compatible capability, e.g. 1.4.0 → 1.5.0), fix warrants a PATCH bump (1.4.0 → 1.4.1), and a BREAKING CHANGE warrants a MAJOR bump (1.4.0 → 2.0.0). The remaining types do not, by default, trigger a release. This is exactly why marking the breaking-change box does two things at once: it appends a ! after the scope and adds a BREAKING CHANGE: footer, both of which automated release tools look for to know they must bump the major version.

A worked example

Pick the feat type, type auth in the scope (or click the suggested auth chip), and write the description add OAuth login. The live preview immediately renders feat(auth): add OAuth login. Now tick "Use emoji prefix" and it becomes ✨ feat(auth): add OAuth login. Tick "Breaking change", fill in the breaking description session cookie renamed, and add 123 in the issue field. The full message becomes:

  • ✨ feat(auth)!: add OAuth login
  • (blank line, then) BREAKING CHANGE: session cookie renamed
  • (blank line, then) Closes #123

Note the issue handling: you can type 123 or #123 and the tool normalises either to Closes #123, and a comma-separated list like 123, 456 produces one Closes line each.

Scope, body, and footers

The scope in parentheses names the part of the codebase a change touches — feat(api), fix(parser) — and is optional but invaluable in larger repositories, because it lets a reader filter the history to just the area they care about. To save typing, the tool offers context-aware scope chips: select fix and it suggests auth, parser, config, api, ui, db; select docs and it suggests readme, changelog, license. Click a chip to fill the field instantly. Below the subject, the optional body is where the "why" lives — a subject states what changed in the imperative, the body explains the reasoning, trade-offs, or context that the diff alone cannot convey. Footers, like the auto-generated Closes #123 and BREAKING CHANGE: lines, are the machine-readable trailers that tooling parses; the tool always separates subject, body, and footers with the blank lines the spec requires.

The diff analyzer

The "Analyze Diff" tab does lightweight pattern matching, not deep semantic analysis. Paste a git diff and it scans the text for tell-tale signs: filenames containing test or spec suggest test; .md, readme, or changelog suggest docs; added lines that introduce a function, class, const, or def suggest feat; touching package.json or requirements.txt suggests build; and .github, a Dockerfile, or .yml files suggest ci. It is a fast first guess to save you a click. Because it only inspects surface patterns, it cannot tell a feature from a refactor when both add functions — so treat its output as a starting suggestion and click "Apply Suggestion" only after confirming it matches your actual intent.

Tips and common mistakes

  • Write the description in the imperative mood. "add login button", not "added" or "adds". The convention reads as "this commit will add the login button" — Git's own generated messages use the same tense.
  • Keep the subject short. The tool caps the description at 72 characters and shows a live counter; long subjects get truncated in git log and on GitHub.
  • One logical change per commit. If you need two types to describe a commit, it is probably two commits.
  • Lowercase, no trailing period in the description — a small consistency rule that keeps changelogs tidy.
  • Emoji are optional. They display fine on GitHub, GitLab, and Bitbucket, but if your team prefers plain text, leave the toggle off; the parseable structure does not depend on them.

Everything runs in your browser — nothing you type, including pasted diffs, is sent to a server.

Perguntas frequentes

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}