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
For now we'll add this to the template package documentation, to make it easy to share
with collaborators. It might also be desirable to place this in the template docs, but
it could also make those too verbose. Perhaps adding a link is the better option once
we converge on the developments standards here.
The summary, slightly adapted by personal preferences (indicated in boldface):
86
+
87
+
*[Separate subject/title from body with a blank line](https://cbea.ms/git-commit/#separate).
88
+
*[Limit the subject line to 50 characters](https://cbea.ms/git-commit/#limit-50)**if possible, 72 is a hard limit**.
89
+
*[Capitalize the subject line](https://cbea.ms/git-commit/#capitalize) and [do not end it with a period](https://cbea.ms/git-commit/#end).
90
+
*[Use the imperative mood in the subject line](https://cbea.ms/git-commit/#imperative).
91
+
*[Wrap the body at](https://cbea.ms/git-commit/#wrap-72)**88 characters**.
92
+
*[Use the body to explain what and why vs. how](https://cbea.ms/git-commit/#why-not-how).
93
+
94
+
In addition, try to make [atomic commits](https://www.freshconsulting.com/insights/blog/atomic-commits/) when possible.
95
+
96
+
#### Specifying the type of change
97
+
98
+
!!!note
99
+
100
+
The stipulations below are based on experience, but are still evolving.
101
+
This text is mainly here to provide a starting point for discussion with collaborators.
102
+
TODO: Look into [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) and see if we want to use/adapt their specification.
103
+
104
+
Specifying the type of change in a commit can be useful for several reasons:
105
+
106
+
- Understanding the changes of a commit.
107
+
- Where to (automatically) put the commit in the changelog, if at all.
108
+
- What to include in a support branch for a previous major release.
109
+
- Encouraging atomic commits.
110
+
- What the priority should be when reviewing open PRs.
111
+
112
+
We use **exactly one leading** emoji per commit to indicate the type of change.
113
+
Some advantages:
114
+
115
+
- Only a single character needed!
116
+
Save precious space in the subject line.
117
+
- A clear visual indicator of the type of change.
118
+
- Clearly separates type from scope/content.
119
+
- Language-agnostic.
120
+
- They look great. At least on macOS.
121
+
122
+
!!! important
123
+
124
+
Although we are in favor of using emojis in the subject line, we do **not** allow emojis in the body.
125
+
This makes it easier to `grep` for commit types.
126
+
127
+
| Emoji | Meaning | Similar to [Angular type](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)| In changelog summary? |
0 commit comments