仓库源文站点原文


layout: post title: GACP, A Better Way to Commit

tags: [project]

More than one year age, I came up with an idea to make git commit more easily. So I made gcmt. See this post for details.

Inspired by commitizen and gitmoji, I have shifted gcmt into gacp.

commitizen can make it easier to bump version and maintain change log through standard-version.

gitmoji adds emoji into git commit, which also brings more fun.

Tools I have mentioned above are written in javascript. Also, it's not easy to change keyboard inputs into which they really means in shell scripts. Using arrow keys to navigate within a prompt is always not working. However, it prints keyboard code. So I decided to make gacp by javascript.

Steps when using gacp as your commit script.

Type gacp in your git repositories.

gacp-type

Choose the type of your changes.

gacp-emoji

Enter the subject of your changing.

gacp-commit

With help of standard-version, we can easily maintain version and change log.

Setup standard-version in package.json.

gacp-standard-version

Run npm run release to bump version and generate CHANGELOG.md.

gacp-release

The output of CHANGELOG.md

gacp-change-log

The versioning and changeloging part is optional. By using gacp, you can still keeping your commit well-organized, pretty and much interesting.