Note: This is a hook binary, you will probably never interact with it directly
Generic usage
mit-commit-msg --helpValidate the commit message that a user has input
Usage: mit-commit-msg [OPTIONS] [COMMIT_FILE_PATH]
Arguments:
[COMMIT_FILE_PATH]
Path to a temporary file that contains the commit message written by the developer
When omitted the hook falls back to `<gitdir>/COMMIT_EDITMSG`, which is useful when the
hook is invoked via a hook manager like lefthook that does not forward git's positional
argument.
Options:
--copy-message-to-clipboard
On lint failure copy the message to clipboard
[env: GIT_MIT_COPY_MESSAGE_TO_CLIPBOARD=]
--completion <COMPLETION>
[possible values: bash, elvish, fish, powershell, zsh]
-h, --help
Print help (see a summary with '-h')
-V, --version
Print versionYou can generate completion with
mit-commit-msg --completion bashWhen no commit file path is provided — for example when a hook manager like
lefthook invokes the hook
without forwarding git's positional argument — the hook falls back to
reading the commit message from .git/COMMIT_EDITMSG. See the
lefthook integration guide for setup instructions.
git init .
printf 'Add a feature\n' > .git/COMMIT_EDITMSG
mit-commit-msg