Skip to content

Instantly share code, notes, and snippets.

@ALiangLiang
Created July 5, 2021 18:37
Show Gist options
  • Save ALiangLiang/0c333594835f2013e8573dca340fa925 to your computer and use it in GitHub Desktop.
Save ALiangLiang/0c333594835f2013e8573dca340fa925 to your computer and use it in GitHub Desktop.
Git Commit Message
# <type>[(scope)]: <subject>
# |<---- 最多 50 個字,請言簡意賅 ---->|
# [body] 說明為何要做這些變動
# |<---- 試著限制每一行在最多 72 個字 ---->|
# [footer] 提供相關文章和其它資源的鏈接和關鍵字
# 範例:Github issue #23
# --- COMMIT END ---
# Type 可以是:
# feat (new feature)
# fix (bug fix)
# refactor (refactoring production code)
# style (formatting, missing semi colons, etc; no code change)
# docs (changes to documentation)
# test (adding or refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
# --------------------
# 記得:
# - subject 前要空格
# - subject 行請使用祈使句
# - subject 行結尾不要使用句點
# - subject 與 body 間要有空行
# - 使用 body 來解釋「what」與「why 」vs.「how」
# - 可以在 body 裡使用「-」來分列表述
# --------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment