Skip to content

Instantly share code, notes, and snippets.

@EHLOVader
Created May 17, 2022 20:59
Show Gist options
  • Save EHLOVader/47ffde8e0d143b692e5a70d0cff7ea25 to your computer and use it in GitHub Desktop.
Save EHLOVader/47ffde8e0d143b692e5a70d0cff7ea25 to your computer and use it in GitHub Desktop.
Commit Message Standards.md

Git commit message standards

:emoji1: :emoji2: Short (50 chars or less) summary of changes

More detailed explanatory text, if necessary. Wrap it to about 72
 characters or so. In some contexts, the first line is treated as the
 subject of an email and the rest of the text as the body. The blank
 line separating the summary from the body is critical (unless you omit
 the body entirely); tools like rebase can get confused if you run the
 two together.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, preceded by a
 single space, with blank lines in between, but conventions vary here

Fix #
 Close #
 Resolve #

In this example we have all of the parts we need to convey the purpose of this change. We prefix the summary with emoji to provide a quick and at a glance view of what type of changes were made. The summary also adds just enough detail to help distinguish the changes in this commit from the changes in all of the surrounding commits in the history log. When writing a commit the following things should be kept in mind and followed as closely as possible.

  • Message Summary SHOULD Begin with at-least One Emoji(see below for list of Suggested Emojis).
  • Capitalize the Summary.
  • Do not end the Summary line with a period.
  • Total Characters of the Summary Line MUST be Less than or Equal to 50 Chars Long.
  • Always leave the second line blank.
  • Use the Present Tense (“Add feature” not “Added feature”).
  • Use the Imperative Mood (“Move cursor to…” not “Moves cursor to…”).
  • Use the Description to explain what and why vs. how.
  • Message Description SHOULD End with at-least One Gitlab Issue number. Ex
  • Fix #123 or Close #231 or Resolve # 312
  • Any of the following keywords will close the related issue.
    • Close, Closes, Closed, Closing, close, closes, closed, closing
    • Fix, Fixes, Fixed, Fixing, fix, fixes, fixed, fixing
    • Resolve, Resolves, Resolved, Resolving, resolve, resolves, resolved, resolving
  • Wrap the Message body at 72 characters.
  • Use Valid MarkDown format in Message Body.
  • All WIP(Work In Progress) Commits MUST have the WIP Emoji.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment