Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/one2r/commit-msg-hook
https://github.com/one2r/commit-msg-hook
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/one2r/commit-msg-hook
- Owner: One2r
- Created: 2022-05-13T09:18:47.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T09:54:40.000Z (4 months ago)
- Last Synced: 2024-07-17T12:18:19.124Z (4 months ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# commit-msg-hook
Git hook that enforces semantic commit messages.## Installation
### Manual
```
curl --fail -o .git/hooks/commit-msg https://raw.githubusercontent.com/One2r/commit-msg-hook/master/commit-msg.sh && chmod 500 .git/hooks/commit-msg
```### By pre-commit
See detail by: https://pre-commit.com## Usage
Git commit message format:
```
type(scope): message
```
A example commit:
```
git commit -a -m "feat: a new featur"
```### Type
Must be one of the following:* **feat**: a new feature is introduced with the changes
* **fix**: a bug fix has occurred
* **chore**: changes that do not relate to a fix or feature and don't modify src or test files (for example updating dependencies)
* **refactor**: refactored code that neither fixes a bug nor adds a feature
* **docs**: updates to documentation such as a the README or other markdown files
* **style**: changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on.
* **test**: including new or correcting previous tests
* **perf**: performance improvements
* **ci**: continuous integration related
* **build**: changes that affect the build system or external dependencies
* **revert**: reverts a previous commit
* **workflow**:
* **release**:### Scope
The scope could be anything specifying place of the commit change.