Support Using git-cliff as Pre-commit Hook
Author: mischifCreated Jul 29, 2026Updated Aug 22, 2026
Labelsfeature/requestwontfix
Is there an existing issue or pull request for this?
- I have searched the existing issues and pull requests
Feature description
I want to use git-cliff to keep my changelog up-to-date. Most of the time I can remember to run it before I commit but the best way to deal with this is to not have to think about it in the first place; thus I want to use git-cliff as a pre-commit hook that runs automatically so I don't have to think about it.
Desired solution
Two parts:
- A
--checkoption for git-cliff that compares the current changelog to a newly-generated one: returns 0 if they're the same, returns 1 if not. It could also have the option to replace the current changelog so committing a second time just works. - A pre-commit hook I can add to my
.pre-commit-config.yamlfile to run git-cliff automatically on commit.
Alternatives considered
Writing my own pre-commit hook:
- I could do this, but I likely wouldn't keep up with updates like the project maintainers; I think this could be easily added to some update pipeline, and the ruff hook suggests creating one wouldn't be so hard.
Additional context
No response
Source: orhun/git-cliff