From 63665a6673594e92787377b82002f713c0d1074b Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Tue, 11 Feb 2025 15:50:51 -0500 Subject: [PATCH] docs: Add a summary of the git commit message rules (#5283) --- CONTRIBUTING.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index accfea0c8..16647ca63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,6 +95,19 @@ Refer to ["How to Write a Git Commit Message"](https://cbea.ms/git-commit/) for general rules on writing a good commit message. +tl;dr +> 1. Separate subject from body with a blank line. +> 2. Limit the subject line to 50 characters. +> * [...]shoot for 50 characters, but consider 72 the hard limit. +> 3. Capitalize the subject line. +> 4. Do not end the subject line with a period. +> 5. Use the imperative mood in the subject line. +> * A properly formed Git commit subject line should always be able +> to complete the following sentence: "If applied, this commit will +> _your subject line here_". +> 6. Wrap the body at 72 characters. +> 7. Use the body to explain what and why vs. how. + In addition to those guidelines, please add one of the following prefixes to the subject line if appropriate. * `fix:` - The primary purpose is to fix an existing bug.