Forrest logo
back to the gitmoji tool

gitmoji:tldr:6b8a5

gitmoji: Initialize the git hook (so `gitmoji` will be run every time `git commit` is run).
$ gitmoji --init
try on your machine

The command "gitmoji --init" is used to initialize the Gitmoji commit hook in a Git repository.

Gitmoji is an open-source initiative that adds emojis to Git commit messages to make them more visually appealing and meaningful. It helps in providing a standardized and visually descriptive way to categorize different types of commits.

When you run the "gitmoji --init" command, it sets up the necessary commit hook in your local Git repository. This commit hook ensures that every commit message you write follows the Gitmoji convention. It parses your commit message and checks if it starts with an emoji and a corresponding code, such as ":sparkles:", ":bug:", etc. If your commit message doesn't follow this format, the hook will throw an error and prevent the commit.

By initializing the Gitmoji commit hook, you can leverage the Gitmoji convention for writing more expressive and readable commit messages, making it easier for you and your collaborators to understand the purpose and intent of each commit.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gitmoji tool