Skip to content

Commit e5af6b3

Browse files
author
Akansh
committed
docs(readme): Adding better examples
1 parent c1232f3 commit e5af6b3

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,30 @@ These are **custom git commands** that encourages the git user to write formatte
3131

3232
## Usage
3333

34-
Once you install, you can have 10 git aliases.
35-
36-
Git alias -> Actual command
37-
38-
* ```git feat <scope> "commit-message-here"``` -> ```git commit -m 'feat(<scope>): commit-message-here'```
39-
* ```git docs <scope> "commit-message-here"``` -> ```git commit -m 'docs(<scope>): commit-message-here'```
40-
* ```git chore <scope> "commit-message-here"``` -> ```git commit -m 'chore(<scope>): commit-message-here'```
41-
* ```git fix <scope> "commit-message-here"``` -> ```git commit -m 'fix(<scope>): commit-message-here'```
42-
* ```git refactor <scope> "commit-message-here"``` -> ```git commit -m 'refactor(<scope>): commit-message-here'```
43-
* ```git style <scope> "commit-message-here"``` -> ```git commit -m 'style(<scope>): commit-message-here'```
44-
* ```git test <scope> "commit-message-here"``` -> ```git commit -m 'test(<scope>): commit-message-here'```
45-
* ```git perf <scope> "commit-message-here"``` -> ```git commit -m 'perf(<scope>): commit-message-here'```
46-
* ```git cleanup <scope> "commit-message-here"``` -> ```git commit -m 'cleanup(<scope>): commit-message-here'```
47-
* ```git tracking <scope> "commit-message-here"``` -> ```git commit -m 'tracking(<scope>): commit-message-here'```
48-
34+
Once you install, you can use 10 git aliases in following ways:
35+
#### 1. __Only Committing__
36+
**```git <type> <scope> <commit-message>```** -> **```git commit -m '<type>(<scope>): <commit-message>'```**
37+
38+
e.g.
39+
* _**git feat** install.sh "added options feature"_ __->__ _git commit -m 'feat(install.sh): added options feature'_
40+
* _**git docs** readme "updated usage section"_ __->__ _git commit -m 'docs(readme): updated usage section'_
41+
* _**git chore** package.json "Added task for uglify"_ __->__ _git commit -m 'chore(package.json): added task for uglify'_
42+
* _**git fix** app "maximum call stack issue"_ __->__ _git commit -m 'fix(app): maximum call stack'_
43+
* _**git refactor** MainController "removed duplicate code"_ __->__ _git commit -m 'refactor(MainController): removed duplicate code'_
44+
* _**git style** input.scss "added secondary styling"_ __->__ _git commit -m 'style(input.scss): added secondary styling'_
45+
* _**git test** appSpec "fixed test cases for code changes"_ __->__ _git commit -m 'test(appSpec): fixed test cases for code changes'_
46+
* _**git perf** main.js "minified and bundled abc.js and def.js"_ __->__ _git commit -m 'perf(main.js): minified and bundled abc.js and def.js'_
47+
* _**git cleanup** dateFilter "removed never executable code"_ __->__ _git commit -m 'cleanup(dateFilter): removed never executable code'_
48+
* _**git tracking** sidebar "clicks on links"_ __->__ _git commit -m 'tracking(sidebar): clicks on links'_
49+
50+
2. __Committing with options__
51+
* **```git <type> <scope> <commit-message> [options]```** -> **```git commit [options] -m '<type>(<scope>): <commit-message>'```**
52+
53+
e.g.
54+
* _**git feat** install.sh "added options feature" a_ __->__ _git commit -a -m 'feat(install.sh): added options feature'_
55+
* _**git fix** app "maximum call stack issue" p_ __->__ _git commit -p -m 'fix(app): maximum call stack'_
56+
57+
**Note:** Only those options can work that precedes `-m` option in git commit, such as `-p`, `-a`, `-s`, `-v`, `-c` .
4958
## Guidelines
5059
### Selecting `type`
5160
Different types of `type` are there according to make sure one can get idea about the core reason of commit message. Current script supports following types of commits.

0 commit comments

Comments
 (0)