Skip to content

Instantly share code, notes, and snippets.

@Aura7988
Last active April 7, 2020 15:56
Show Gist options
  • Select an option

  • Save Aura7988/61b1cf7ba498ef11c9305e2d5f005472 to your computer and use it in GitHub Desktop.

Select an option

Save Aura7988/61b1cf7ba498ef11c9305e2d5f005472 to your computer and use it in GitHub Desktop.
[commit]
template = ~/.commit-template
[merge]
tool = vimdiff
[mergetool "vimdiff"]
path = nvim
[difftool]
prompt = false
[alias]
d = difftool
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci)%Creset'
---------.commit-template---------
# 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