Skip to content

Commit 3cf6f84

Browse files
authored
Merge pull request #8 from ExcelsiorFamily/define-commit-styleguide
Define git commit messages guidelines
2 parents 8b268d8 + 33c4750 commit 3cf6f84

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ These guidelines are based on [Building a strong community Github documentation]
1010
* [Multiple Issue Templates Over Single Issue Template](#multiple-issue-template-over-single-issue-template)
1111
* [Issue & Pull Request Expectation](#issue--pull-request-expectation)
1212
* [Promoting A High Contribution Quality](#promoting-a-high-contribution-quality)
13+
* [Git Commit Messages](#git-commit-messages)
14+
* [Short Commit Messages](#short-commit-messages)
15+
* [Issue Reference](#issue-reference)
16+
* [Commit Nature](#commit-nature)
1317
* [Milestone](#milestone)
1418
* [Incremental Title](#incremental-title)
1519
* [Short Iterative Due Date](#short-iterative-due-date)
@@ -96,6 +100,59 @@ Templates should promote a high contribution quality by referring [contributing
96100
...
97101
```
98102

103+
## Git Commit Messages
104+
105+
Git commit messages should help reviewers to do better reviews.
106+
107+
### Short Commit Messages
108+
109+
Short commit messages should help reviewers to quickly understand what has been done. It should be short, clear and written at the present tense and imperative mood.
110+
111+
**Preferred:**
112+
```markdown
113+
- Add get user feature.
114+
- Update navigation storyboard.
115+
```
116+
117+
**Not Preferred:**
118+
```markdown
119+
- Added get user feature.
120+
- Updates navigation storyboard.
121+
```
122+
123+
### Issue Reference
124+
125+
Referencing issue in git commit messages should help anyone to track progress on a specific issue. Git commit messages should always reference issues at the end.
126+
127+
**Preferred:**
128+
```markdown
129+
- Improve cache management. Related to #42.
130+
- Remove unused ViewController method. Related to #1024.
131+
```
132+
133+
**Not Preferred:**
134+
```markdown
135+
- Improve cache management.
136+
- #1024 Remove unused ViewController method.
137+
```
138+
139+
### Commit Nature
140+
141+
Emojis should help reviewers to quickly and visually identify the nature of the commit. For clear visual identification start the commit message with an applicable emoji:
142+
143+
- :art: `:art:` when improving the format/structure of the code
144+
- :racehorse: `:racehorse:` when improving performance
145+
- :non-potable_water: `:non-potable_water:` when plugging memory leaks
146+
- :memo: `:memo:` when writing docs
147+
- :bug: `:bug:` when fixing a bug
148+
- :fire: `:fire:` when removing code or files
149+
- :green_heart: `:green_heart:` when fixing the CI build
150+
- :white_check_mark: `:white_check_mark:` when adding tests
151+
- :lock: `:lock:` when dealing with security
152+
- :arrow_up: `:arrow_up:` when upgrading dependencies
153+
- :arrow_down: `:arrow_down:` when downgrading dependencies
154+
- :shirt: `:shirt:` when removing linter warnings
155+
99156
## Milestone
100157

101158
Milestones should be based on iterative development and produce incremental builds. It enforces Agile methodology and promote continuous integration and deployment. It allows you to follow overall progress and create [changelogs](#changelog) based on opened/closed issues.
@@ -256,3 +313,5 @@ Type of change labels are only used for pull requests. They give information abo
256313
- [The Official raywenderlich.com Swift Style Guide](https://github.com/raywenderlich/swift-style-guide/blob/master/README.markdown).
257314
- [Sane GitHub Labels](https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63).
258315
- [GitHub Labels and Milestones](https://docs.saltstack.com/en/2017.7/topics/development/labels.html).
316+
317+
- [Atom CONTRIBUTING.md](https://github.com/atom/atom/blob/master/CONTRIBUTING.md)

0 commit comments

Comments
 (0)