Skip to content

Commit 818b4a0

Browse files
author
Charlike Mike Reagent
committed
fix(readme): update the Install section
Signed-off-by: Charlike Mike Reagent <[email protected]>
1 parent 3af3ec6 commit 818b4a0

File tree

3 files changed

+85
-3
lines changed

3 files changed

+85
-3
lines changed

.verb.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,48 @@ Project is [semantically](https://semver.org) & automatically released on [Circl
4747
This project requires [**Node.js**][nodeversion-url] **v{%= engines.node.slice(2) %}** or above. Install it using [**yarn**](https://yarnpkg.com) **v{%= engines.yarn.slice(2) %}+** or [**npm**](https://www.npmjs.com) **v{%= engines.npm.slice(2) %}+** package managers.
4848

4949
```
50-
$ yarn add {%= name %} --dev
50+
$ yarn add {%= name %}
51+
```
52+
53+
Or install it globally and for example run `gitcommit --scope`. It will prompt you with questions
54+
for commit type, commit scope and commit subject (short description). The type and subject questions are required always, so you can't skip them.
55+
56+
```
57+
$ yarn global add {%= name %}
58+
```
59+
60+
All `git commit` flags are available too.
61+
62+
```
63+
# -s is --signoff, -S is --gpg-sign
64+
$ gitcommit -S -s --scope --body --footer
65+
66+
# equivalent of above is following
67+
# where -x is --scope, -y is --body and -w is --footer
68+
$ gitcommit -Ssxyw
69+
```
70+
71+
Above command will GPG Sign commit, add `Sign-off-by` at the end line, prompt
72+
for commit scope, body and footer. Consider we commit breaking change.
73+
74+
```
75+
$ gitcommit -Ssxyw
76+
? Select the type of this change ›
77+
❯ fix: A bug fix
78+
feat: New feature
79+
major: Breaking change
80+
chore: Non src or test files changes
81+
docs: Documentation only changes
82+
✔ What is the scope of this change? … refactor
83+
✔ Short, imperative tense description … huge api change
84+
✔ Longer description (or fixes #17423, closes #33) … some pretty long body description.
85+
✔ List issues or PRs (e.g. fixes #1771, resolves #371) … fixes #33, resolves #511
86+
```
87+
88+
The actual `git command` which will be executed is like
89+
90+
```
91+
$ git commit -S -s --allow-empty-message -m "major(refactor): huge api change" -m "" -m "some pretty long body description." -m "" -m "fixes #33, closes #511"
5192
```
5293

5394
<!--

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,48 @@ Project is [semantically](https://semver.org) & automatically released on [Circl
5151
This project requires [**Node.js**][nodeversion-url] **v8.6** or above. Install it using [**yarn**](https://yarnpkg.com) **v1.3+** or [**npm**](https://www.npmjs.com) **v5.2+** package managers.
5252

5353
```
54-
$ yarn add gitcommit --dev
54+
$ yarn add gitcommit
55+
```
56+
57+
Or install it globally and for example run `gitcommit --scope`. It will prompt you with questions
58+
for commit type, commit scope and commit subject (short description). The type and subject questions are required always, so you can't skip them.
59+
60+
```
61+
$ yarn global add gitcommit
62+
```
63+
64+
All `git commit` flags are available too.
65+
66+
```
67+
# -s is --signoff, -S is --gpg-sign
68+
$ gitcommit -S -s --scope --body --footer
69+
70+
# equivalent of above is following
71+
# where -x is --scope, -y is --body and -w is --footer
72+
$ gitcommit -Ssxyw
73+
```
74+
75+
Above command will GPG Sign commit, add `Sign-off-by` at the end line, prompt
76+
for commit scope, body and footer. Consider we commit breaking change.
77+
78+
```
79+
$ gitcommit -Ssxyw
80+
? Select the type of this change ›
81+
❯ fix: A bug fix
82+
feat: New feature
83+
major: Breaking change
84+
chore: Non src or test files changes
85+
docs: Documentation only changes
86+
✔ What is the scope of this change? … refactor
87+
✔ Short, imperative tense description … huge api change
88+
✔ Longer description (or fixes #17423, closes #33) … some pretty long body description.
89+
✔ List issues or PRs (e.g. fixes #1771, resolves #371) … fixes #33, resolves #511
90+
```
91+
92+
The actual `git command` which will be executed is like
93+
94+
```
95+
$ git commit -S -s --allow-empty-message -m "major(refactor): huge api change" -m "" -m "some pretty long body description." -m "" -m "fixes #33, closes #511"
5596
```
5697

5798
<!--

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"lint": "hela lint",
99
"test": "hela test --no-build",
1010
"precommit": "yarn lint && yarn test && git add --all",
11-
"commit": "node ./src/cli.js -Ss",
11+
"commit": "node ./src/cli.js",
1212
"release": "hela release --no-build",
1313
"prepublishOnly": "hela protect"
1414
},

0 commit comments

Comments
 (0)