Skip to content

Commit fc11f8e

Browse files
committed
📚 Design: Add example format for a commit message
1 parent 89a57cc commit fc11f8e

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎docs/design.md‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Good development standards make for better code.
7676

7777
### Commit messages
7878

79-
> A well-cared for log is a beautiful and useful thing
79+
> A well-cared for (commit) log is a beautiful and useful thing
8080
8181
This quote comes from the following article, which should be considered a mandatory read for anyone maintaining a package:
8282

@@ -92,6 +92,26 @@ The summary, slightly adapted by personal preferences (indicated in boldface):
9292
* [Use the body to explain what and why vs. how](https://cbea.ms/git-commit/#why-not-how).
9393

9494
In addition, try to make [atomic commits](https://www.freshconsulting.com/insights/blog/atomic-commits/) when possible.
95+
We've also taken inspiration from the [MyST parser contribution guide](https://github.com/executablebooks/MyST-Parser?tab=contributing-ov-file#commit-messages).[^1]
96+
97+
[^1]: Shoutout to my boi [Chris Sewell](https://github.com/chrisjsewell). The man, the legend. The quintessential British b***ard.
98+
99+
Here is an example of the desired format for a commit message:
100+
101+
```
102+
<EMOJI> <SCOPE>: Summarize changes in 72 characters or less
103+
104+
More detailed explanatory text, if necessary. Explain the problem that this
105+
commit is solving. Focus on what you are changing, why you are making this
106+
change and why you chose your approach, as opposed to how the change was made
107+
(the code and comments should explain that). Are there side effects or other
108+
unintuitive consequences of this change? Here's the place to explain the
109+
context of your commit to someone else reading your message in the future
110+
(most likely you).
111+
112+
PS: There is no need to mention you also added unit tests when adding a new
113+
feature. The code diff already makes this clear.
114+
```
95115

96116
#### Specifying the type of change
97117

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ theme:
44
markdown_extensions:
55
- admonition
66
- pymdownx.details
7+
- footnotes

0 commit comments

Comments
 (0)