Skip to content

Commit d1ff217

Browse files
committed
docs(contributing): add commit-style doc
1 parent 7cf3c0d commit d1ff217

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Git Commit Guidelines
2+
3+
These rules are adopted from the AngularJS project.
4+
5+
### Commit Message Format
6+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
7+
format that includes a **type**, a **scope** and a **subject**:
8+
9+
```
10+
<type>(<scope>): <subject>
11+
<BLANK LINE>
12+
<body>
13+
<BLANK LINE>
14+
<footer>
15+
```
16+
17+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
18+
to read on github as well as in various git tools.
19+
20+
### Type
21+
Must be one of the following:
22+
23+
* **feat**: A new feature
24+
* **fix**: A bug fix
25+
* **docs**: Documentation only changes
26+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
27+
semi-colons, etc)
28+
* **refactor**: A code change that neither fixes a bug or adds a feature
29+
* **test**: Adding missing tests
30+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
31+
generation
32+
33+
### Scope
34+
The scope could be anything specifying place of the commit change. For example `app`,
35+
`gen`, `docs`, `gen:view`, `gen:route`, `gen:service`, etc...
36+
37+
### Subject
38+
The subject contains succinct description of the change:
39+
40+
* use the imperative, present tense: "change" not "changed" nor "changes"
41+
* don't capitalize first letter
42+
* no dot (.) at the end
43+
44+
###Body
45+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes"
46+
The body should include the motivation for the change and contrast this with previous behavior.
47+
48+
###Footer
49+
The footer should contain any information about **Breaking Changes** and is also the place to
50+
reference GitHub issues that this commit **Closes**.
51+
52+
A detailed explanation can be found in this [document][commit-message-format].
53+
54+
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y

0 commit comments

Comments
 (0)