Skip to content

Commit 6c9055d

Browse files
committed
docs: commitlint
1 parent e69d262 commit 6c9055d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,20 @@ content(log): add corrupted blood incident rant
6161
- Updated posts.json with metadata
6262
- Added unique category color for 'rant'
6363
```
64+
65+
## Git Hooks
66+
67+
This project uses **Native Git Hooks** to automatically enforce the commit message format.
68+
69+
### How it Works
70+
When you run `npm install`, a script sets your git configuration `core.hooksPath` to the local `git-hooks/` directory.
71+
Inside this directory is a `commit-msg` script. Whenever you run `git commit`, Git triggers this script.
72+
The script runs `commitlint` to check your message against our rules.
73+
74+
### Troubleshooting
75+
If you are unable to commit because of a "stuck" hook or an error, ensure you have run `npm install`.
76+
In an emergency (if the hook is broken), you can bypass verification:
77+
```bash
78+
git commit --no-verify -m "your message"
79+
```
80+
**Note:** Please use this sparingly and only if you are sure your message format is correct.

0 commit comments

Comments
 (0)