编写格式化的 commit message
能够大大提高代码的维护效率。
比如:
commit
(比如文档改动),便于快速查找信息;commit
生成 Change log
;<type>(<scope>): <subject>
// 空一行
<body>
// 空一行
<footer>
其中,Header 是必需的,Body 和 Footer 可以省略。
type
用于说明 commit 的类别。
feature
A new featurefix
A bug fixdocs
Documentation only changesstyle
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor
A code change that neither fixes a bug nor adds a featureperf
A code change that improves performancetest
Adding missing tests or correcting existing testsbuild
Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci
Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)chore
Other changes that don't modify src or test filesrevert
Reverts a previous commitscope
用于说明 commit 影响的范围,比如数据层、控制层、视图层、具体模块等等,视项目不同而不同。
subject
是 commit 目的的简短描述,不超过50个字符。
Body
部分是对本次 commit 的详细描述,可以分成多行。
BREAKING CHANGE
,用来描述当前 commit 与上一个版本不兼容的地方。
Issue
,用来描述当前 commit 针对的某个issue。
Commit message 和 Change log 编写指南
太教条了,太累... 给大家分享一个我使用的工具。
JetBrains IDE
插件,在 GoLand
、PhpStorm
中 都可以在插件市场搜索 Git Commit Message Helper
。
插件地址:Git Commit Message Helper
安装后效果,在 git commit 时:
咱们看一下效果:
这时,点击 Commit 或 Commit and Push... 即可。
赶快去体验吧。
先点赞再看,养成好习惯 前言 这两天在另一个社区看到了一个关于 Tomcat 的提问...
Redis 官方在 2020 年 5 月正式推出 6.0 版本,提供很多振奋人心的新特性,所以...
解决方法如下: 第一种 使用iframe,但是目前使用iframe的人已经越来越少了,而...
data URI scheme 允许我们使用内联(inline-code)的方式在网页中包含数据,可以...
1.HTML5的内容类型 内容类型 描述 内嵌 向文档中添加其他类型的内容,例如audio...
content属性一般用于::before、::after伪元素中,用于呈现伪元素的内容。平时con...
复制代码 代码如下: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional...
简介: 企业上云多账号架构中,如何做到从上到下管理的同时,处理好员工的权限边...
注释1:上图整个大背景是这个网页的全部尺寸,中间的小框才是浏览器中的可见尺寸...
John Au-Yeung 来源:medium 译者:前端小智 有梦想,有干货,微信搜索 【大迁世...