提交示例

为什么会有这一章节

请参考 Conventional Commits 来获取更多信息。

一条好的 commit message 能帮助我们

  1. 理解贡献者试图做什么
  2. 自动生成变更日志

编写 commit message 的规则

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/

# --------------------

Commit message 模板

下面是一个 commit message 的模板,供您参考。

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]

你可以在 commitlint.config.js 中查看 typescope 的允许值,

保持 git 提交历史的整洁