Skip to content

Commit Commenting Guidelines

zumbak04 edited this page Feb 20, 2020 · 1 revision

These guidelines are intended for developers and to keep a sort of standardization in our repository commits.

General Commit Guidelines

  • The subject line of your commit should be a short summary, around 50 characters or less.
  • The second half of your commit message, the body, should explain what was changed in greater detail.
  • You can use paragraphs and bullet points in the body, using hyphens or asterisks and a hanging indent.
  • If you use paragraphs, try to keep them separated by blank lines for improved readability.
  • If your commit is being made in reference to an issue or pull request, be sure to reference it! (#123, #567, etc)

Examples

Added localisation for twilight hammer artifact <-- (Subject Line)

**-- Git Automatically separates the subject line and body when you go to the next line --**

Added lines to "00_zuwc_united_localisation.csv" for the artifact "twilight_hammer" <-- (Body)

Click Here to See 1st Exemplary Commit

Click Here to See 2nd Exemplary Commit

Rules for a Great Commit Message

  • Separate the subject line from the body with a blank line
  • Do not end the subject line with a period
  • Capitalize the subject line and the beginning of each paragraph in your body
  • 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.

Information Given in Messages

  • Describe why a change is being made.
  • How does it address the issue?
  • What effects does the patch have?
  • Do not assume the reviewer understands what the original problem was.
  • Do not assume the code is self-evident/self-documenting.
  • Read the commit message to see if it hints at improved code structure.
  • The first commit line is the most important.
  • Describe any limitations of the current code.
  • Do not include patch set-specific comments.