How to provide the commit-msg hook message back to the user?

Viewed 35

I'm using husky and commitlint to enforce a style on git commits.

I'm a CLI guy so I can read the stderr directly in the terminal to know what I messed up in the commit message.

Other contributors prefer to avoid the terminal using different tools to interact with git.

How can I let them know why their commit is rejected?

I'm thinking about adding the output of the hook to .git/COMMIT_MSG so I can edit my message while reading at the reason it failed with a simple git commit -eF .git/COMMIT_MSG. I'm just not sure this flow is supported by other tools/IDE.

0 Answers
Related