Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.93 KB

CHAPTER3-COMMIT_CONVENTIONS.md

File metadata and controls

46 lines (26 loc) · 1.93 KB

Chapter 3 - Commit Conventions

We encourage a commit convention style utilized by the Linux kernel. Unlike semantic commit messages, we only focus on the summary of the changes.

General Guidelines

  • Subject is limited to 50 characters.
  • Subject should capitalize the first letter.
  • Subject should not have a period or any other punctuation marks after the end.
  • Commits should be in imperative tone.
  • Structure messages in 2W1H format (What, Why, How), if applicable.

Subject is Limited to 50 characters

This keeps the initial summary concise, details should be reserved in the second Git commit line message. The only exceptions here are Git messages that are generated by default.

Subject should capitalize the first letter

Commits are now required to follow some English syntax queues, preferrably now the subject line is now encouraged to be capitalized at the first letter.

Subject should not have a period or any punctuation marks at the end

In accordance to the subject character limit rule, punctuation marks at the end of the subject line is now illegal.

Commits should be in imperative tone

Imperative is defined as "of vital importance" or "in command", commits should always remain in imperative tone since this is also the default tone used in Git default messages.

Structure messages in 2W1H format (What, Why, How)

Adapted from the Linux kernel, the 2W1H format structures the messages on three main points

  • What: what is the specific problem we're trying to solve?
  • Why: why should it be solved, what impact does it have for the end user?
  • How: explain how your solution would work.

This is entirely optional, but encouraged, since it presents a rather good structure when explaining complex commits.

References