![Forrest logo](/images/logo.png)
gitmoji:tldr:6b8a5
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.