Git 提交信息生成器
根据常规提交规范或您团队的格式撰写清晰的提交信息。包括范围、类型和重大变更指示。
需要无限使用次数?
升级至 Pro — $19/moYour Git 提交信息生成器 results will appear here
Expect clean code blocks with comments, plus a short explanation of what changed.
如何使用 Git 提交信息生成器
- Describe the changes you made in plain language — what files changed, what behavior is different, and why you made the change.
- Select your team's commit convention (Conventional Commits is the most widely adopted).
- Choose the change type that best categorizes your change — 'feat' for new features, 'fix' for bug fixes, 'refactor' for restructuring.
- Optionally add a scope to narrow the context (e.g., 'auth' for authentication changes, 'ui' for frontend updates).
使用案例
Write consistent commit messages across a team of developers
Generate commit messages that work with automated changelog generators
Create descriptive commits for open-source contributions and pull requests
Document complex refactoring changes with clear before/after context
最佳结果的技巧
- Include the 'why' in your description, not just the 'what' — this helps generate commit bodies that provide valuable context for future developers.
- Use specific scopes for monorepos: 'api', 'web', 'shared', 'infra' — this makes git log filtering much more useful.
- For breaking changes, mention what the old behavior was and what it is now — the generator will format a proper BREAKING CHANGE footer.
- The Conventional Commits format enables automatic version bumping and changelog generation with tools like semantic-release and standard-version.
常见问题
What is Conventional Commits?
Conventional Commits is a specification for commit messages that provides a structured format: type(scope): description. It enables automatic changelog generation, semantic version bumping, and makes git history searchable. It is the most widely adopted commit convention in the industry.
Should I use the subject-only or detailed version?
Use subject-only for small, self-explanatory changes (typo fixes, dependency updates). Use the detailed version with a body for feature additions, bug fixes, refactors, or any change where future developers will benefit from understanding the reasoning.
What scope should I use?
Scopes represent the section of the codebase affected: 'auth' for authentication, 'api' for REST endpoints, 'ui' for frontend components, 'db' for database changes, 'ci' for pipeline changes. Use scopes consistently across your team — leave blank for cross-cutting changes.
How does this help with changelogs?
Conventional Commits format is machine-readable. Tools like semantic-release, standard-version, and release-please can parse your commits to automatically generate categorized changelogs (Features, Bug Fixes, Breaking Changes) and determine version numbers.
What is the 72-character rule?
Git and many tools display the first line of a commit message as a summary. Keeping subject lines under 72 characters ensures they display fully in git log, GitHub, and IDE interfaces without being truncated. The body should also wrap at 72 characters for terminal readability.
Part of these workflows
This tool is used in step-by-step guides that help you get more done
我们不存储您的文本。处理在实时进行,您的输入在生成结果后立即被丢弃。
解锁无限访问
免费用户:每天 5 次使用 | Pro 用户:无限制
本文包含联盟链接。如果您通过这些链接购买,我们可能会获得少量佣金,而您无需支付任何额外费用。
Semrush
All-in-one SEO platform for keyword research, site audits, and competitive analysis.
See how this tool stacks up side-by-side:
✍️ Prompt Library
Ready-to-use prompts — click "Use This" to auto-fill the tool
Write a Python function that [describe what it does]. Include type hints and a docstring.
Explain this code and suggest improvements: [paste code]
Generate unit tests for the following function: [paste function]
Write a SQL query to [describe what you need] from a table with columns [list columns].
Create a README.md for a [project type] project with installation, usage, and contributing sections.