Skip to content
On this page

alias

alias is used to define some common git commit messages. We may encounter commit messages that are often output, such as docs: fix typos, if we define like:

json
// .czrc
{
  "alias": {
    "fd": "docs: fix typos",
    "ur": "docs: update README",
    ":": "docs(blog): update posts"
  }
}
// .czrc
{
  "alias": {
    "fd": "docs: fix typos",
    "ur": "docs: update README",
    ":": "docs(blog): update posts"
  }
}

Tip The options default value is fd. You try it in any project npx czg :fd

czg CLI Usage

sh
czg :fd
git czg :fd
# or
czg --alias=fd
git czg --alias=fd
czg :fd
git czg :fd
# or
czg --alias=fd
git czg --alias=fd

demo-gif

commitizen CLI Usage

sh
cz_alias=fd cz
# or
cz_alias=fd git cz
cz_alias=fd cz
# or
cz_alias=fd git cz

demo-gif

WARNING

Use Commitizen CLI like cz_alias=fd cz. The process can't exit after commit.

Because cz-cli not listening for Node.js close event, cz-git can't handle.

I just try my best to make thing well, Could you give a star ⭐