Skip to content

Commit message rules

Warren Zhu edited this page Aug 2, 2018 · 2 revisions

Commit message rules

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how
  8. Try to your best to explain commit's purpose without looking at the change
  9. If commit refers some issue. Suffix Fix #100 such as Refactor something. Fix #100

Any commit message violates such rule need to be rewritten.

Reference