Skip to content

Commit 879904f

Browse files
committed
📚 Add file with commit message guidelines
1 parent 0c36012 commit 879904f

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

COMMITS.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Commits
2+
3+
This file describe rules that must be applied to commit code to
4+
ReferenceFrameRotations.jl.
5+
6+
Notice that this document is **under construction**.
7+
8+
## Best practices
9+
10+
The following list of best practices should be considered when creating commits
11+
for this project:
12+
13+
1. The commits should be incremental. Try to avoid very big changes within just
14+
one commit.
15+
2. The overall state of the software must be as functional as possible between
16+
two commits. Try to avoid commits that break the entire software if another
17+
commit is not applied.
18+
19+
## Commit message
20+
21+
The commit message must have the following structure:
22+
23+
```
24+
<EMOJI> Short summary of changes
25+
-- BLANK LINE --
26+
More detailed explanatory text, if necessary. Wrap it to 67
27+
characters. In some contexts, the first line is treated as the
28+
subject of an email and the rest of the text as the body. The
29+
blank line separating the summary from the body is critical (unless
30+
you omit the body entirely); tools like rebase can get confused if
31+
you run the two together.
32+
33+
Further paragraphs come after blank lines.
34+
35+
- Bullet points are okay, too.
36+
37+
- Typically a hyphen or asterisk is used for the bullet, preceded
38+
by a single space, with blank lines in between, but conventions
39+
vary here.
40+
```
41+
42+
**Source**: Adapted from http://git-scm.com/book/ch5-2.html
43+
44+
Notice that:
45+
46+
1. The short summary **must** be less than **50 characters**. The emojis, if
47+
present, count as 1 character each.
48+
2. **Don't** end the summary with a period.
49+
3. If the summary indicates an action, then if **must** be written in imperative
50+
form. Hence, write "Fix ...", "Change ...", and "Add ...", instead of "Fixed
51+
...", "Changed ...", or "Added ...".
52+
3. It is preferred that only one emoji is used per commit.
53+
4. All the phrases in the explanatory text **must** be punctuated.
54+
5. If there is an explanatory text, a blank line **must** exist between the
55+
short summary of changes and the explanatory text.
56+
6. The is no limit for the detailed explanatory text, but it must be wrap to 72
57+
characters.
58+
59+
## Commit emojis
60+
61+
Emojis can be used to improve the understanding about the commit. It can be used
62+
at the beginning of the commit message to indicate what kind of modification the
63+
commit does. The following table describe some situations:
64+
65+
| Commit Type | Emoji |
66+
|------------------------|----------------------------------------------------------------|
67+
| Initial Commit | :tada: `:tada:` |
68+
| Version Tag | :bookmark: `:bookmark:` |
69+
| New Feature | :sparkles: `:sparkles:` |
70+
| Bugfix | :bug: `:bug:` |
71+
| Refactoring | :package: `:package:` |
72+
| Documentation | :books: `:books:` |
73+
| Internationalization | :globe_with_meridians: `:globe_with_meridians:` |
74+
| Performance | :racehorse: `:racehorse:` |
75+
| Cosmetic | :lipstick: `:lipstick:` |
76+
| General improvements | :wrench: `:wrench:` |
77+
| Tests | :rotating_light: `:rotating_light:` |
78+
| Deprecation | :poop: `:poop:` |
79+
| Work In Progress (WIP) | :construction: `:construction:` |
80+
| Warning | :warning: `:warning:` |
81+
| Other | [See here](https://www.webpagefx.com/tools/emoji-cheat-sheet/) |
82+
83+
**Note**: If the commit contains an important warning, such as a breaking change, then the emoji :warning: `:warning:` must be added to the commit title. In this case, two emojis can be used.

0 commit comments

Comments
 (0)