as a formal document rather than a hurdle, you ensure your project's history remains a readable, valuable asset rather than a cryptic list of "updates." to automate your team's message format?

If you're working on a commit and want to use "interesting text" as your commit message, you would:

#!/bin/sh MSG_FILE="$1" # Git passes .git/COMMIT_EDITMSG as $1 if ! head -1 "$MSG_FILE" | grep -qE "^(feat|fix|docs): "; then echo "ERROR: Commit message must follow Conventional Commits format" exit 1 fi

 Share  Tweet