Commit Message Structure
First line: Capitalized, short summary
The first line should be a capitalized, short (50 chars or less) summary.Include the component name for which the change is being made:
[Analyzer]short (50 chars or less) summary[dart2js]short (50 chars or less) summary[CFE]short (50 chars or less) summary[CoreLib]short (50 chars or less) summary[ddc]short (50 chars or less) summary[VM - Runtime]short (50 chars or less) summary[VM - GC]short (50 chars or less) summary
Always add a blank line
Always add a blank line before more information. Many git tools assume this layout and rely on it for proper formatting.
Detailed explanation (if necessary)
Add more detailed explanatory text if necessary. Wrap it to about 72 characters or so.This section should provide context about:
- Why the change is needed
- What problem it solves
- Any important implementation details
Link to GitHub issues properly
When linking to an associated GitHub Issue:DO:
- Use the full GitHub URL to the issue (ensures the issue is clickable in Gerrit)
- Use GitHub notation to auto-close bugs on commit:
- Put
Issue 234in the title - Use the old BUG= format:
If you don’t want to delete the
BUG= boilerplate, at least add a space after the = to ensure the issue link is clickable in Gerrit.Complete Example
Here’s a complete example following all the guidelines:Component Prefixes
Use these component prefixes to help identify which part of the SDK your change affects:[Analyzer]
Changes to the Dart analyzer
[dart2js]
Changes to the dart2js compiler
[CFE]
Changes to the Common Front End
[CoreLib]
Changes to core libraries
[ddc]
Changes to the Dart Dev Compiler
[VM - Runtime]
Changes to VM runtime
[VM - GC]
Changes to VM garbage collection
Quick Checklist
Before committing, verify your commit message:- First line is 50 characters or less
- Component prefix is included (e.g.,
[Analyzer]) - Blank line after the first line
- Detailed description wrapped at 72 characters
- GitHub issue linked with full URL
- Uses
Closes https://...for auto-closing issues - Written in present tense
- Summary focuses on what and why, not how