Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64a2bbb

Browse files
author
Mohammad Shokri
authored
⚡ Rework whole document
1 parent 235fccf commit 64a2bbb

File tree

1 file changed

+85
-39
lines changed

1 file changed

+85
-39
lines changed

‎README.md

Lines changed: 85 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
Git Commit Message StyleGuide
2-
=============================
3-
4-
[![emoji](https://img.shields.io/badge/emoji-%F0%9F%A6%84%20%F0%9F%92%9F-lightgrey.svg)](https://en.wikipedia.org/wiki/Emoji#Unicode_blocks)
5-
[![GitHub contributors](https://img.shields.io/github/contributors/slashsBin/styleguide-git-commit-message.svg)](https://github.com/slashsBin/styleguide-git-commit-message/graphs/contributors)
6-
[![GitHub stars](https://img.shields.io/github/stars/slashsBin/styleguide-git-commit-message.svg)](https://github.com/slashsBin/styleguide-git-commit-message/stargazers)
7-
[![license](https://img.shields.io/github/license/slashsBin/styleguide-git-commit-message.svg)](https://github.com/slashsBin/styleguide-git-commit-message/blob/master/LICENSE)
8-
[![ghit.me](https://ghit.me/badge.svg?repo=slashsBin/styleguide-git-commit-message)](https://ghit.me/repo/slashsBin/styleguide-git-commit-message)
9-
1+
<p align="center">
2+
<img src="https://git-scm.com/images/logos/downloads/Git-Logo-1788C.png" alt="Git" height="128">
3+
<span>&amp;</span>
4+
<img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f984.png" alt="Unicorn" height="128">
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://en.wikipedia.org/wiki/Emoji#Unicode_blocks"><img src="https://img.shields.io/badge/emoji-%F0%9F%A6%84%20%F0%9F%92%9F-lightgrey.svg" alt="Powered by Emojis!"></a>
9+
<a href="https://github.com/slashsBin/styleguide-git-commit-message/graphs/contributors"><img src="https://img.shields.io/github/contributors/slashsBin/styleguide-git-commit-message.svg" alt="GitHub contributors"></a>
10+
<a href="https://github.com/slashsBin/styleguide-git-commit-message/stargazers"><img src="https://img.shields.io/github/stars/slashsBin/styleguide-git-commit-message.svg" alt="GitHub stars"></a>
11+
<a href="https://github.com/slashsBin/styleguide-git-commit-message/blob/master/LICENSE"><img src="https://img.shields.io/github/license/slashsBin/styleguide-git-commit-message.svg" alt="license"></a>
12+
<a href="https://ghit.me/repo/slashsBin/styleguide-git-commit-message"><img src="https://ghit.me/badge.svg?repo=slashsBin/styleguide-git-commit-message" alt="ghit.me"></a>
13+
</p>
14+
15+
# Git Commit Message StyleGuide
1016

1117
##### TOC
1218
- [About](#about)
1319
- [Commit Message Format](#commit-message-format)
14-
- [Notes](#notes)
1520
- [Suggested Emojis](#suggested-emojis)
1621
- [Tools](#tools)
22+
- [References](#references)
1723
- [Fun Emoji Usages](#fun-emoji-usages)
1824
- [Contributing](#contributing)
1925
- [License](#license)
@@ -26,41 +32,81 @@ Using emojis at the beginning of commit messages, other than being fun, provides
2632

2733
If these rules and/or using emojis is an [overkill](/../../issues/21) for your productivity or simply losing its purposes, please tailor them to your needs or don't use them.
2834

35+
### Summary of the reasons for these conventions:
36+
- Fun!
37+
- Simple navigation through git history (e.g. ignoring style changes).
38+
- Automatic generating of the changelog.
39+
2940

3041
## Commit Message Format
3142

32-
All Git Commit Messages **MUST** meet with this Text Format:
3343
```
34-
:emoji1: :emoji2: Subject
35-
(Only One NewLine)
36-
Message Body
37-
(Only One NewLine)
38-
Ref <###>
44+
<type>(<scope>): <subject>
45+
46+
<body>
47+
48+
<footer>
3949
```
4050

41-
### Rules
42-
43-
1. Capitalize the _Subject_.
44-
2. Do not end the _Subject_ line with a period.
45-
3. Message _Subject_ **SHOULD** Begin with _at-least_ One Emoji(see below for [list of Suggested Emojis](#suggested-emojis)).
46-
4. Message Body **SHOULD** End with _at-least_ One Issue Tracking ID Reference([GitHub Issues](https://github.com/features#issues)/[GitLab Issues](https://docs.gitlab.com/ee/user/project/issues/)/[Phabricator Tasks](http://phacility.com/phabricator/maniphest/)), Ex. `Issue #27`, `Ref T27` or `Ref T27, T56` or `Fixes T8`.
47-
It's also [recommanded](/../../issues/19) to use _Full URL to Issues_, instead of just Issue ID Number; Doing so will ease browsing issues from terminal.
48-
5. Total Characters of the _Subject Line_ **MUST** be _Less_ than or _Equal_ to **50** Chars Long.
49-
6. Wrap the _Message body_ at **72** characters.
50-
7. Use Valid [MarkDown](https://daringfireball.net/projects/markdown/basics) format in _Message Body_.
51-
8. Use the **Present Tense** ("Add feature" not "Added feature").
52-
9. Use the **Imperative Mood** ("Move cursor to..." not "Moves cursor to...").
53-
10. Use the _Message body_ to explain **what** and **why** vs. how.
54-
11. All WIP(Work In Progress) Commits **MUST** have the WIP Emoji(see below).
55-
56-
## Notes
57-
58-
+ All **WIP** Commits **Should** be Avoided!.
59-
+ Refrencing Issues by using special keywords like `Fixes` or `Resolves` will mark them as closed automatically! For more information about automatic issue closing using ketwords see: [GitHub](https://help.github.com/articles/closing-issues-via-commit-messages/)/[GitLab](https://docs.gitlab.com/ee/user/project/issues/automatic_issue_closing.html)/[Phabricator](https://secure.phabricator.com/book/phabricator/article/diffusion_autoclose/).
60-
+ There is a **Space** Character between Multiple Emojis!.
61-
+ There is **NO** New-Line After the _Task ID Reference_ Line.
62-
+ Every Raw Emoji Text(`:emoji:`) is Counted as One Char!.
63-
+ See [ToDo Grammar StyleGuide](https://github.com/slashsBin/styleguide-todo-grammar) for more Information on `@XXX` Comment Tags.
51+
### Message Subject(first line)
52+
- Capitalize the `<subject>`.
53+
- Do not end the first line with a period.
54+
- Total characters of the first line **MUST** be _Less_ than or _Equal_ to **50** characters Long.
55+
- Use the **present tense** ("Add feature" not "Added feature").
56+
- Use the **imperative mood** ("Move cursor to..." not "Moves cursor to...").
57+
- Use `<type>` to identify what type of changes introduced in this commit; Allowed `<type>` keywords:
58+
- An Emoji(see below for [list of Suggested Emojis](#suggested-emojis))
59+
- Or a Text:
60+
- feat: new feature for the user(or :sparkles: emoji)
61+
- fix: bug fix for the user(or :ambulance: emoji)
62+
- docs: changes to the documentation(or :books: emoji)
63+
- style: formatting, missing semi colons, etc; no production code change(or :art: emoji)
64+
- refactor: refactoring production code, eg. renaming a variable(or :tractor: emoji)
65+
- test: adding missing tests, refactoring tests; no production code change(or :microscope: emoji)
66+
- chore: updating grunt tasks etc; no production code change
67+
- If you need more than one keyword or emoji to use, you should probably think twice!. This usally means you need to break this commit into more smaller commits; If thats not the case then separate each emoji with a space.
68+
- Use `<scope>` to identify which component this `<type>` is related to; Example `<scope>` values:
69+
- init
70+
- runner
71+
- watcher
72+
- config
73+
- web-server
74+
- proxy
75+
- etc.
76+
- The `<scope>` can also be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
77+
78+
### Message Body
79+
- Includes **motivation** for the change and contrasts with previous behavior.
80+
- Use the body to explain **whats** and **whys** vs. *hows*.
81+
- Wrap each line of the body at **72** characters.
82+
83+
### Message Footer
84+
- Refrence issues this commit is related to with the status of that Issue; Ex. `Issue #27`, `Ref T27` or `Ref T27, T56` or `Fixes T8`.
85+
- Supported issue tracker status keywords:
86+
- Fixes
87+
- Fixed
88+
- Closes
89+
- Closed
90+
- Resolves
91+
- Resolved
92+
- Ref
93+
- Issue
94+
- Issues
95+
- More info on issue tracker status keywords:
96+
- [GitHub Issues](https://help.github.com/articles/closing-issues-using-keywords/)
97+
- [GitLab Issues](https://docs.gitlab.com/ee/user/project/issues/automatic_issue_closing.html)
98+
- [Phabricator Tasks](https://secure.phabricator.com/book/phabricator/article/diffusion_autoclose/)
99+
- It's also [recommanded](/../../issues/19) to use _Full URL to the Issues_, instead of just issue ID Number; Doing so will ease browsing issues from terminal.
100+
- In the case of multiple issues separate them with commas, Ex. `Closes #27, #56`.
101+
102+
### Notes
103+
- Use valid [MarkDown](https://daringfireball.net/projects/markdown/basics) format in the `<body>`.
104+
- All **WIP**(Work In Progress) commits **SHOULD** have the :construction: Emoji.
105+
- All **WIP** commits **SHOULD** be avoided!.
106+
- Refrencing Issues by using special keywords like `Fixes` or `Resolves` will mark them as closed automatically! For more information about automatic issue closing using ketwords see their documentation(linked above).
107+
- There is **NO** new-line after the `<footer>`.
108+
- Every emoji text(`:emoji:`) is counted as one character!.
109+
- See [ToDo Grammar StyleGuide](https://github.com/slashsBin/styleguide-todo-grammar) for more Information on `@XXX` Comment Tags.
64110

65111

66112
## Suggested Emojis

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /