Any commitizen users here?
Wanted behavior:
git commit
git cz
Current behavior:
git commit
git cz
, just default git interfaceCommitizen is a tool designed for teams. Its main purpose is to define a standard way of committing rules and communicating it (using the cli provided by commitizen). The reasoning behind it is that it is easier to read, and enforces writing descriptive commits.
Without adding any files, the command git commit won't work. Git only looks to the staging area to find out what to commit. Staging, or adding, files, is possible through the command line, and also possible with most Git interfaces like GitHub Desktop by selecting the lines or files that you'd like to stage.
To add a Git commit message to your commit, you will use the git commit command followed by the -m flag and then your message in quotes. Adding a Git commit message should look something like this: git commit -m “Add an anchor for the trial end sectionnn.”
git-cz is short for git-commitizen. A Conventional commit cli. git-cz gives tools to work with Conventional Commits. The tool is still in early development.
yes you can do it with the git hooks. Just do the following as it is written on the https://commitizen.github.io/cz-cli/ site.
Add in the file .git/hooks/prepare-commit-msg (if the file is not present just create it) in your root folder of the project following lines:
#!/bin/bash
exec < /dev/tty && node_modules/.bin/git-cz --hook || true
If the file is already there just add the exec line and git commit
will now show the same menu as when git cz
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With