You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -789,6 +789,65 @@ mainstream architectures. PDP-11 era is long gone.
789
789
- It is fair to assume that `NULL` is matching `(uintptr_t) 0` and it is fair
790
790
to `memset()` structures with zero. Non-zero `NULL` is for retro computing.
791
791
792
+
## Git Commit Style
793
+
794
+
Clear and descriptive commit messages are crucial for maintaining a transparent history of changes and for facilitating effective debugging and tracking. Please adhere to the guidelines outlined in [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/).
795
+
1. Separate the subject from the body with a blank line.
796
+
2. Limit the subject line to 50 characters.
797
+
3. Capitalize the subject line.
798
+
4. Do not end the subject line with a period.
799
+
5. Use the imperative mood in the subject line.
800
+
6. Wrap the body at 72 characters.
801
+
7. Use the body to explain what and why, not how.
802
+
803
+
An example (derived from Chris' blog post) looks like the following:
804
+
805
+
```text
806
+
Summarize changes in around 50 characters or less
807
+
808
+
More detailed explanatory text, if necessary. Wrap it to about 72
809
+
characters or so. In some contexts, the first line is treated as the
810
+
subject of the commit and the rest of the text as the body. The
811
+
blank line separating the summary from the body is critical (unless
812
+
you omit the body entirely); various tools like `log`, `shortlog`
813
+
and `rebase` can get confused if you run the two together.
814
+
815
+
Explain the problem that this commit is solving. Focus on why you
816
+
are making this change as opposed to how (the code explains that).
817
+
Are there side effects or other unintuitive consequences of this
818
+
change? Here's the place to explain them.
819
+
820
+
Further paragraphs come after blank lines.
821
+
822
+
- Bullet points are okay, too
823
+
824
+
- Typically a hyphen or asterisk is used for the bullet, preceded
825
+
by a single space, with blank lines in between, but conventions
826
+
vary here
827
+
828
+
If you use an issue tracker, put references to them at the bottom,
829
+
like this:
830
+
Close #123
831
+
```
832
+
833
+
In addition, this project expects contributors to follow these additional rules:
834
+
* If there is important, useful, or essential conversation or information,
835
+
include a reference or copy it.
836
+
* Do not write single-word commits. Provide a descriptive subject.
837
+
* Avoid using just a filename (e.g., `Update qtest.c`).
838
+
Each commit message subject should be sufficiently descriptive.
839
+
* Avoid using abusive words.
840
+
* For queue functions (names starting with "q_", e.g., `Implement q_size` or `Finish q_new`),
841
+
ensure the commit message includes a detailed explanation in the body.
842
+
* Avoid using backticks in commit subjects.
843
+
Backticks can be easily confused with single quotes on some terminals,
844
+
reducing readability. Plain text or single quotes provide sufficient clarity and emphasis.
845
+
* Avoid using parentheses in commit subjects.
846
+
Excessive use of parentheses "()" can clutter the subject line,
847
+
making it harder to quickly grasp the essential message.
848
+
849
+
Some conventions are automatically enforced by the [githooks](https://git-scm.com/docs/githooks).
0 commit comments