提交示例
为什么需要本章
关于约定式提交,请参阅 Conventional Commits。
规范的提交信息可以帮助我们:
- 理解贡献者想做什么
- 自动生成变更日志
编写提交信息的规则
md
# (If applied, this commit will...) <subject> (Max 72 characters)
# |<---- Using a Maximum Of 72 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Use issues and merge requests' full URLs instead of short references,
# as they are displayed as plain text outside of GitLab
# --- COMMIT END ---
# --------------------
# Remember to
# Capitalize the subject line
# Use the imperative mood in the subject line
# Do not end the subject line with a period
# Subject must contain at least 3 words
# Separate subject from body with a blank line
# Commits that change 30 or more lines across at least 3 files should
# describe these changes in the commit body
# Do not use Emojis
# Use the body to explain what and why vs. how
# Can use multiple lines with "-" for bullet points in body
# For more information: https://chris.beams.io/posts/git-commit/
# --------------------提交信息模板
下面是一份模板,供参考。
md
feat(components): [button] I did something with button
Blank between subject and body is expected.(period is expected)
Describes your change in one line or multi-line.
Capitalize your first letter when starting a new line
Please do not exceeds 72 characters per line, because that would be harder to comprehend.
- You can also add bullet list symbol for better layout主题行格式为:
[type](scope): [messages]type 与 scope 的允许取值见仓库中的 commitlint.config.js。