Reputation: 227
I'm looking for a way to prevent commits which have no correct format for the commit message.
I intend to use the following convention:
https://www.conventionalcommits.org/en/v1.0.0/
I found out there is a folder with bash scripts which may be the key to that solution: .git/hooks/
However, I'm not sure how to write the script to enforce the format on the commit messages.
Will edit accordingly, thank you in advance.
Upvotes: 5
Views: 11697
Reputation: 41
The official Conventional Commits website maintains a list of tools to aid in enforcement, management and configuration.
I've linked to it directly, as it isn't immediately obvious on the site where that is. For anyone curious, it is under the "about" section.
The list is not exhaustive, but a very good place to start. The tools are varied, ranging from "complete" solutions that handle rule enforcement and standards, to "helpers" that simplify a single part of the process. Explore and find the tools that work best for you.
Upvotes: 1
Reputation: 586
There is a list of Tools in the documentation.
My suggestion would be to:
Upvotes: 5