首先我们一起来看看行业统一认可且标准的 angular 项目的git commit规范写法。 https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular 基本格式 首先一个规范的git commit message通常包含 Header、Body 和 Footer 三部分,各部分之间使用空行分隔。 <header> ...
#安装 $ npm install validate-commit-msg husky -D #添加package.json文件配置 "husky": { "hooks": { "commit-msg": "validate-commit-msg" } } #自定义校验格式(可选) #添加一个.vcmrc文件,配置对象如下: { "types": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "...
1. commit message format(信息域) commit message一般分为三个部分Header,Body 和 Footer <type>(<scope>):<subject>// 空一行<body>// 空一行<footer>其中,Header 是必需的,Body 和 Footer 可以省略 Example: PS D:\git\pythonPractice> git log commit 58a7a966acb9aa2fffc0e02c9ce3be64b8949991 (...
首先我们一起来看看行业统一认可且标准的 angular 项目的git commit规范写法。 https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular 基本格式 首先一个规范的git commit message通常包含 Header、Body 和 Footer 三部分,各部分之间使用空行分隔。 代码语言:j...
$ git log <last tag> HEAD --pretty=format:%s 可以过滤某些commit(比如文档改动),便于快速查找信息。 比如,下面的命令仅仅显示本次发布新增加的功能。 $ git log <last release> HEAD --grep feature 可以直接从commit生成Change log。 Change Log 是发布新版本时,用来说明与上一个版本差异的文档,详见后文...
$ git log <last tag> HEAD --pretty=format:%s 可以过滤某些commit(比如文档改动),便于快速查找信息 $ git log <last release> HEAD --grep feature 可以直接从commit生成Change log。 Change Log 是发布新版本时,用来说明与上一个版本差异的文档,详见后文。
type :commit的类型 feat:新特性 fix:修改问题(bug修复) refactor:代码重构 docs:文档修改 style:代码格式修改 test:测试用例修改 chore:其他修改,例如构建流程,依赖配置等。 scope:本次修改影响范围,例如 route,component,utils,build等 subject :修改内容的概述 ...
“commit”: “./node_modules/cz-customizable/standalone.js” } } 在根目录新建 .cz-config.js 并复制 cz-config-EXAMPLE.js 到文件。 效果: commitlint commitlint检查您的提交消息是否符合conventional commit format。 1、安装 @commitlint/cli、husky: ...
通常我们使用 git log 查看 commit 信息,如下:我们可以使用以下命令,得到更简洁的输出:git log <last tag> HEAD --pretty=format:%s 另外,我们可以使用 --grep 得到包含某些单词的提交,比如 --grep feature 来得到属于 feature 类型的提交:git log <last release> HEAD --pretty=format:%s --grep feat 5...
commit.template If you set this to the path of a file on your system, Git will use that file as the default initial message when you commit. The value in creating a custom commit template is that you can use it to remind yourself (or others) of the proper format and style when creat...