Skip to content

Prepare Commit Message

David Ortner edited this page Jan 29, 2024 · 2 revisions

Prepares commit message.

This is useful in combination with a tool like Husky.

Usage

Basic Usage

happy-prepare-commit-message --commitFile={commitFile} --commitType={commitType}

With Husky

  1. Install Husky
  2. Create the file ".husky/commit-msg"
  3. Add the following to the file ".husky/prepare-commit-msg":
    #!/bin/sh
    . "$(dirname "$0")/_/husky.sh"
    ./node_modules/.bin/happy-prepare-commit-message --commitFile=$1 --commitType=$2
Clone this wiki locally