Skip to content

Instantly share code, notes, and snippets.

@paddingme
Forked from yulijia/.git-commit-blog.txt
Created January 3, 2018 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paddingme/3ab6df2a88dd9ed9290a0fcccd9734d2 to your computer and use it in GitHub Desktop.
Save paddingme/3ab6df2a88dd9ed9290a0fcccd9734d2 to your computer and use it in GitHub Desktop.
git commit template in Chinese
# Type(<scope>): <subject>
# <body>
# <footer>
# type字段
# add 增加新博客/页面(add new post/page)
# correct 改错别字/语法(correct spelling/grammar )
# update 更新内容(update content)
# change 修改YAML说明(change YAML front-matter)
# scope字段
# post/page, spelling/grammar, content, YAML front-matter
# subject字段
# 短描述,可以包含文件名等内容(如果名字过长,用首字母大写代替,省略连词)。(`add(post):20160121-postname.md `)
# body字段
# 具体的修改内容,如果是新增博客/页面,则可以省略。
# footer字段为空
# 该格式中文版介绍,请看这里
# http://yulijia.net/cn/%E6%A0%BC%E5%BC%8F%E6%8A%80%E5%B7%A7/2016/01/21/git-commit-style.html#commit-message
# Type(<scope>): <subject>
# <body>
# <footer>
# type 字段包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
# scope用于说明 commit 影响的范围,比如数据层、控制层、视图层等等。
# subject是 commit 目的的简短描述,不超过50个字符
# Body 部分是对本次 commit 的详细描述,可以分成多行
# Footer用来关闭 Issue或以BREAKING CHANGE开头,后面是对变动的描述、
# 以及变动理由和迁移方法
# 英文版详细例子,请看这里
# https://github.com/sparkbox/how_to/tree/master/style/git
# 中文版介绍,请看这里
# http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment