Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strategies for enforcing commitizen

See original GitHub issue

I’m not sure that this is the right place to open this but here goes; have there been any discussions on how to enforce commitizen? We started using it in a few projects at work but it’s both easy to forget and hard to make sure that everyone committing to the project respects it.

Maybe an idea would be to add a commitizen check master that checks all commits that have been added on this branch when compared to master. The exit code should be 0 (success) when all messages looks good.

This way we can run that as part of our CI step.

Any ideas?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

shogochiaicommented, Apr 21, 2019

My strategy is like this.

It prevents git commit locally, but don’t kill git-cz.

"scripts": {
    "warn-commit": "echo '\n\n\n\n Use `yarn commit` \n\n\n\n' && exit 1",
    "commit": "npx git-cz --no-verify"
"pre-commit": [
PrasoonDavidcommented, Aug 20, 2020

Use Husky to overide standard git commit

"hooks": {
    "pre-commit": "lint-staged",
    "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
    "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Organize Your Git Commits Using Commitizen
The reasoning behind it is that it is easier to read, and enforces writing descriptive commits. Besides that, having a convention on your ......
Read more >
Enforce Commit Message Standards and Generate ...
Enforcing commit message rules. Install and setup tools that help generate commit messages that are compliant. Generate the changelog for ...
Read more >
Commitizen: Is there a way to override standard `git commit`?
yes you can do it with the git hooks. Just do the following as it is written on the site.
Read more >
Git Project Setup with Husky, Conventional Commits, and ...
... 18:40 Install commitizen 21:20 git-flow branching strategy 24:25 github-flow branching strategy 27:20 gitlab-flow branching strategy ...
Read more >
About - Conventional Commits
php-commitizen: A PHP tool built to create commit messages following the Conventional Commits specs. Configurable and usable for PHP projects as a composer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found