We have a commit message template we add to projects so devs know the format of the commit message when writing their commit messages.
# Type(<scope>): <subject>
chore: add git hooks for testing before pushing
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
# * style (formatting, missing semi colons, etc; no code change)
# * refactor (refactoring production code)
# * test (adding missing tests, refactoring tests; no production code change)
# * chore (updating grunt tasks etc; no production code change)
# Scope is just the scope of the change. Something like (admin) or (teacher).
# Subject should use impertivite tone and say what you did.
# The body should go into detail about changes made.
# The footer should contain any tool issue references or actions.
# For a full example of how to write a good commit message, check out
# https://github.com/sparkbox/how_to/tree/master/style/git
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch chore/reset_to_clean_src
# Changes to be committed:
# modified: package.json
# modified: yarn.lock
yet it does with this:
INVALID COMMIT MSG: does not match "<type>(<scope>): <subject>" ! was: # Type(<scope>): <subject>
chore: add git hooks for testing before pushing
# <body>
# <footer>