A Roadmap
  • Introduction
  • Roadmap
  • Basics
    • Basic Terminal Usage
      • Shell
        • 基本
        • 变量
        • 传递参数
        • 运算符
        • 命令
        • 流程控制
        • 函数
        • 输入输出重定向
    • Character Encoding
      • 字符编码
    • Data Structures & algorithms
    • Network
      • TCP/IP
      • Http/Https
        • 浏览器缓存
        • Status Code
        • GET & POST
        • HTTPS 握手过程
        • HostOnly Cookie
      • CDN
        • CDN 工作原理
    • Version Control
      • git message format
      • git commands
    • Principles
    • Design Patterns
    • Others
      • JSON
      • 正则表达式
  • Front End
    • Web Standard
      • Html
      • CSS
        • font-face 小记
        • Grid 布局简易笔记
      • Javascript
        • Ajax
          • Fetch
          • XMLHttpRequest
        • DOM
          • Selection
          • 常用 DOM 操作
          • script 标签的几个属性
        • Ecmascript
          • this 关键字
          • Event Loop
          • 隐式转换
          • Date
        • Event
          • 模拟事件
          • Others
    • Development
      • Package Management
        • npm
      • Modulization
        • 模块化机制
        • webpack 打包解析
      • Architecture
      • Build Tools
        • 如何编写一个自定义的 eslint 规则?
      • Debug
        • 移动端调试 web
      • Pre/Post Processors
      • Test
        • Jest Snapshot 使用指南
      • Type Checkers
        • TS 中 enum 的编译结果
    • Libs & frameworks
    • Platforms
      • Browser
        • Basics
          • 从输入 URL 到页面加载完成都发生了什么事情?
          • HTML 加载的过程示意图
          • 为什么读取某些属性,也会导致回流?
          • Chrome 进程模型
        • PWA
        • Compatible
        • Cross Origin
        • Performance
          • 性能检测:performance 对象
          • 性能指标
        • Others
          • 移动端 web 开发笔记
      • Server
      • Desktop Applications
      • Mobile Applications
        • Flutter 在移动端和 Web 端的技术实现
  • Back End
    • outline
    • Languages
      • Node
        • Event Loop
        • NodeJS 中的进程与线程
        • NodeJS 中的 esModule 与 commonJS
  • Clients
    • outline
    • 安装 IPA 包
  • DevOps
    • Languages
    • OS Concepts
    • Servers & terminal
  • UI & UX
    • outline
  • Others
    • Posts
      • 使用 node 爬取数据并导出到 excel
      • antd 1.x datepicker 时区问题
      • babel-transform-runtime 踩坑记录
      • lodash 按需加载注意事项
      • 记一次项目迁移的踩坑记录
      • 时区与JS中的Date对象
      • 记一次 vue + ts 开发踩坑
    • Tools
      • 个人常用的工具分享
      • tmux 简要笔记
Powered by GitBook
On this page
  • Format
  • Header
  • Body
  • Footer
  • Appendix
  • Reference

Was this helpful?

  1. Basics
  2. Version Control

git message format

Format

  • Header (required)

  • Body (optional)

  • Footer (optional)

<type>(<scope>): <subject>
\n
<body>
\n
<footer>

Header

Header should contain type(required), scope(optional) and subject(required) in one line.

1. type

type is used to describe the type of a commit. Several commonly used types are provided for consideration:

- feat: new feature
- fix: fix bug
- refactor: modifications other than features or fixes
- release: release a new version
- style: format or beautify code without effects on main function
- chore: modifications of dependencies or build tools
- docs: write documentation(e.g. README.md)

2. scope

scope describes the scope of a commit, such as view layer, data layer, etc.

3. subject

subject is a brief description of a commit and it's suggested to be limited in 50 characters.

  • start with a verb

  • end without a period

Body

Body contains more detailed explanatory text where contents could be wapped to multiple lines.

feat(font-end): click affix to back to homepage

- add affix component in all detail pages
- add css styles for user interface

Footer

Footer is an uncommon part. When some breaking changes are added to a commit, it's mainly used to append descriptions, reasons and methods of migration

Appendix

Below is some commits from Lark/pc-client repository:

commit xxxxxx
Author: xxx <xxx@abc.com>
Date:   Tue Feb 21 18:47:17 2017 +0800

    relase: version 0.5.9

    Change-Id: xxxxxx


commit xxxxxx
Author: xxx <xxx@abc.com>
Date:   Mon Feb 20 22:12:18 2017 +0800

    feat: 一些细节优化

    1. 切换会话input focus
    2. 点击群会话聊天头像直接进入单人会话
    3. 群描述没有时不再显示“无说明”
    4. 欢迎界面修改

    Change-Id: xxxxxx


commit xxxxxx
Author: xxx <xxx@abc.com>
Date:   Mon Feb 20 13:21:58 2017 +0800

    fix: sessionid获取失败时 没有重连websocket

    Change-Id: xxxxxx


commit xxxxxx
Author: xxx <xxx@abc.com>
Date:   Tue Feb 28 11:07:25 2017 +0800

    style: 不在ui规范中的颜色不占用对应的变量名

    Change-Id: xxxxxx

Reference

PreviousVersion ControlNextgit commands

Last updated 5 years ago

Was this helpful?

《Commit message 和 Change log 编写指南》(阮一峰)
5 Useful Tips For A Better Commit Message