我正在寻找一种防止提交消息格式没有正确格式的提交的方法。
我打算使用以下约定:
https://www.conventionalcommits.org/en/v1.0.0/”
.git/hooks/,
但是,我不确定如何编写脚本以在提交消息上执行格式。
将相应地编辑,谢谢您。
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.
发布评论
评论(2)
文档中有一个
我的建议是:
There is a list of Tools in the documentation.
My suggestion would be to:
官方常规委员会网站维护帮助执行,管理和配置。
我已经直接链接到它,因为它在所在的网站上并不明显。对于任何好奇的人来说,它都在“关于”部分。
列表并不详尽,而是一个很好的起点。这些工具各不相同,从处理规则执行和标准的“完整”解决方案到简化了过程的单个部分的“帮助者”。探索并找到最适合您的工具。
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.