Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazcod/semantic-commit-hook
Git hook that enforces semantic commit messages.
https://github.com/hazcod/semantic-commit-hook
git git-hook hook semantic-versioning
Last synced: 2 months ago
JSON representation
Git hook that enforces semantic commit messages.
- Host: GitHub
- URL: https://github.com/hazcod/semantic-commit-hook
- Owner: hazcod
- Created: 2019-05-17T05:24:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-25T04:47:08.000Z (9 months ago)
- Last Synced: 2024-05-02T05:09:45.207Z (9 months ago)
- Topics: git, git-hook, hook, semantic-versioning
- Language: Shell
- Homepage:
- Size: 59.6 KB
- Stars: 46
- Watchers: 5
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# semantic-commit-hook
Git hook that enforces semantic commit messages.## What is it
Semantic versioning automatically assigns version numbers on your code based on your commit messages.
This means that it recognizes hotfixes, refactors, breaking and non-breaking changes.
In my case, it automatically builds and creates a new release on Github based on the work that has been done.You can read more about it [here](https://github.com/semantic-release/semantic-release#how-does-it-work).
## How to use
Any commit to your local git repository will be rejected if the first line (the title) does not follow [the semantic versioning format](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commit-message-format).For releasing, I use [go-semantic-release](https://github.com/go-semantic-release/semantic-release).
## Installation
```shell
curl --fail -o .git/hooks/commit-msg https://raw.githubusercontent.com/hazcod/semantic-commit-hook/master/commit-msg \
&& chmod 500 .git/hooks/commit-msg
```