Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dagonmetric-contributor/b3815561401555fa9ac2530f32e56dd3 to your computer and use it in GitHub Desktop.
Save dagonmetric-contributor/b3815561401555fa9ac2530f32e56dd3 to your computer and use it in GitHub Desktop.
Commit Message Guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
generated by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too.
- Typically a hyphen or asterisk is used for the bullet, followed by a
  single space. Use a hanging indent.

Example for a commit message

Update README.md to include Gitter badge

Rules for a great git commit message style

  • Separate subject from body with a blank line
  • Do not end the subject line with a period
  • Capitalize the subject line and each paragraph
  • Use the imperative mood in the subject line
  • Wrap lines at 72 characters
  • Use the body to explain what and why you have done something. In most cases, you can leave out details about how a change has been made.

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment